rsx: Aesthetic changes

This commit is contained in:
kd-11 2024-01-21 03:00:46 +03:00 committed by kd-11
parent 9a9b5860df
commit ca7de4bcb1
2 changed files with 20 additions and 9 deletions

View File

@ -21,7 +21,7 @@ R"(
if (_test_bit(rop_control, INT_FRAMEBUFFER_BIT)) if (_test_bit(rop_control, INT_FRAMEBUFFER_BIT))
{ {
col0 = round_to_8bit(col0); col0 = round_to_8bit(col0);
col1 = round_to_8bit(col1); col1 = round_to_8bit(col1);
col2 = round_to_8bit(col2); col2 = round_to_8bit(col2);
col3 = round_to_8bit(col3); col3 = round_to_8bit(col3);
} }
@ -49,10 +49,21 @@ R"(
#endif #endif
#ifdef _ENABLE_PROGRAMMABLE_BLENDING #ifdef _ENABLE_PROGRAMMABLE_BLENDING
col0 = do_blend(col0, mrt_color[0]); switch (framebufferCount)
if (framebufferCount > 1) col1 = do_blend(col1, mrt_color[1]); {
if (framebufferCount > 2) col2 = do_blend(col2, mrt_color[2]); case 4:
if (framebufferCount > 3) col3 = do_blend(col3, mrt_color[3]); col3 = do_blend(col3, mrt_color[3]);
// Fallthrough
case 3:
col2 = do_blend(col2, mrt_color[2]);
// Fallthrough
case 2:
col1 = do_blend(col1, mrt_color[1]);
// Fallthrough
default:
col0 = do_blend(col0, mrt_color[0]);
break;
}
#endif #endif
// Commit // Commit

View File

@ -872,10 +872,10 @@ namespace rsx
static inline const std::array<bool, 4> get_write_output_mask(rsx::surface_color_format format) static inline const std::array<bool, 4> get_write_output_mask(rsx::surface_color_format format)
{ {
const std::array<bool, 4> rgba = { true, true, true, true }; constexpr std::array<bool, 4> rgba = { true, true, true, true };
const std::array<bool, 4> rgb = { true, true, true, false }; constexpr std::array<bool, 4> rgb = { true, true, true, false };
const std::array<bool, 4> rg = { true, true, false, false }; constexpr std::array<bool, 4> rg = { true, true, false, false };
const std::array<bool, 4> r = { true, false, false, false }; constexpr std::array<bool, 4> r = { true, false, false, false };
switch (format) switch (format)
{ {