mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Cosmetic improvements
This commit is contained in:
parent
35a66fe776
commit
0baf873534
1 changed files with 19 additions and 19 deletions
|
@ -563,10 +563,10 @@ namespace rsx
|
||||||
|
|
||||||
void draw_command_processor::fill_scale_offset_data(void* buffer, bool flip_y) const
|
void draw_command_processor::fill_scale_offset_data(void* buffer, bool flip_y) const
|
||||||
{
|
{
|
||||||
int clip_w = REGS(m_ctx)->surface_clip_width();
|
const int clip_w = REGS(m_ctx)->surface_clip_width();
|
||||||
int clip_h = REGS(m_ctx)->surface_clip_height();
|
const int clip_h = REGS(m_ctx)->surface_clip_height();
|
||||||
|
|
||||||
float scale_x = REGS(m_ctx)->viewport_scale_x() / (clip_w / 2.f);
|
const float scale_x = REGS(m_ctx)->viewport_scale_x() / (clip_w / 2.f);
|
||||||
float offset_x = REGS(m_ctx)->viewport_offset_x() - (clip_w / 2.f);
|
float offset_x = REGS(m_ctx)->viewport_offset_x() - (clip_w / 2.f);
|
||||||
offset_x /= clip_w / 2.f;
|
offset_x /= clip_w / 2.f;
|
||||||
|
|
||||||
|
@ -576,9 +576,9 @@ namespace rsx
|
||||||
if (flip_y) scale_y *= -1;
|
if (flip_y) scale_y *= -1;
|
||||||
if (flip_y) offset_y *= -1;
|
if (flip_y) offset_y *= -1;
|
||||||
|
|
||||||
float scale_z = REGS(m_ctx)->viewport_scale_z();
|
const float scale_z = REGS(m_ctx)->viewport_scale_z();
|
||||||
float offset_z = REGS(m_ctx)->viewport_offset_z();
|
const float offset_z = REGS(m_ctx)->viewport_offset_z();
|
||||||
float one = 1.f;
|
const float one = 1.f;
|
||||||
|
|
||||||
utils::stream_vector(buffer, std::bit_cast<u32>(scale_x), 0, 0, std::bit_cast<u32>(offset_x));
|
utils::stream_vector(buffer, std::bit_cast<u32>(scale_x), 0, 0, std::bit_cast<u32>(offset_x));
|
||||||
utils::stream_vector(static_cast<char*>(buffer) + 16, 0, std::bit_cast<u32>(scale_y), 0, std::bit_cast<u32>(offset_y));
|
utils::stream_vector(static_cast<char*>(buffer) + 16, 0, std::bit_cast<u32>(scale_y), 0, std::bit_cast<u32>(offset_y));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue