Skip to content

Commit

Permalink
rsx: Aesthetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 committed Jan 21, 2024
1 parent c1502d2 commit d62b273
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
21 changes: 16 additions & 5 deletions rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXROPEpilogue.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ R"(
if (_test_bit(rop_control, INT_FRAMEBUFFER_BIT))
{
col0 = round_to_8bit(col0);
col1 = round_to_8bit(col1);
col1 = round_to_8bit(col1);
col2 = round_to_8bit(col2);
col3 = round_to_8bit(col3);
}
Expand Down Expand Up @@ -49,10 +49,21 @@ R"(
#endif

#ifdef _ENABLE_PROGRAMMABLE_BLENDING
col0 = do_blend(col0, mrt_color[0]);
if (framebufferCount > 1) col1 = do_blend(col1, mrt_color[1]);
if (framebufferCount > 2) col2 = do_blend(col2, mrt_color[2]);
if (framebufferCount > 3) col3 = do_blend(col3, mrt_color[3]);
switch (framebufferCount)
{
case 4:
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

// Commit
Expand Down
8 changes: 4 additions & 4 deletions rpcs3/Emu/RSX/rsx_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -872,10 +872,10 @@ namespace rsx

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 };
const std::array<bool, 4> rgb = { true, true, true, false };
const std::array<bool, 4> rg = { true, true, false, false };
const std::array<bool, 4> r = { true, false, false, false };
constexpr std::array<bool, 4> rgba = { true, true, true, true };
constexpr std::array<bool, 4> rgb = { true, true, true, false };
constexpr std::array<bool, 4> rg = { true, true, false, false };
constexpr std::array<bool, 4> r = { true, false, false, false };

switch (format)
{
Expand Down

0 comments on commit d62b273

Please sign in to comment.