Cosmetic improvements

This commit is contained in:
kd-11 2024-12-28 23:04:32 +03:00 committed by kd-11
parent 35a66fe776
commit 0baf873534

View file

@ -563,10 +563,10 @@ namespace rsx
void draw_command_processor::fill_scale_offset_data(void* buffer, bool flip_y) const
{
int clip_w = REGS(m_ctx)->surface_clip_width();
int clip_h = REGS(m_ctx)->surface_clip_height();
const int clip_w = REGS(m_ctx)->surface_clip_width();
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);
offset_x /= clip_w / 2.f;
@ -576,9 +576,9 @@ namespace rsx
if (flip_y) scale_y *= -1;
if (flip_y) offset_y *= -1;
float scale_z = REGS(m_ctx)->viewport_scale_z();
float offset_z = REGS(m_ctx)->viewport_offset_z();
float one = 1.f;
const float scale_z = REGS(m_ctx)->viewport_scale_z();
const float offset_z = REGS(m_ctx)->viewport_offset_z();
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(static_cast<char*>(buffer) + 16, 0, std::bit_cast<u32>(scale_y), 0, std::bit_cast<u32>(offset_y));