rsx: Rework gamma override mask from RGBA to ARGB to match other per-channel mask registers

This commit is contained in:
kd-11 2021-08-29 23:22:41 +03:00 committed by kd-11
commit b5dcfb3431
2 changed files with 5 additions and 3 deletions

View file

@ -9,10 +9,10 @@ namespace rsx
// TODO: Move this somewhere else once more compilers are supported other than glsl // TODO: Move this somewhere else once more compilers are supported other than glsl
enum texture_control_bits enum texture_control_bits
{ {
GAMMA_R = 0, GAMMA_A = 0,
GAMMA_R,
GAMMA_G, GAMMA_G,
GAMMA_B, GAMMA_B,
GAMMA_A,
ALPHAKILL, ALPHAKILL,
RENORMALIZE, RENORMALIZE,
EXPAND_A, EXPAND_A,

View file

@ -107,7 +107,9 @@ namespace rsx
u8 fragment_texture::gamma() const u8 fragment_texture::gamma() const
{ {
return ((registers[NV4097_SET_TEXTURE_ADDRESS + (m_index * 8)] >> 20) & 0xf); // Converts gamma mask from RGBA to ARGB for compatibility with other per-channel mask registers
const u32 rgba8_ctrl = ((registers[NV4097_SET_TEXTURE_ADDRESS + (m_index * 8)] >> 20) & 0xf);
return ((rgba8_ctrl << 1) & 0xF) | (rgba8_ctrl >> 3);
} }
u8 fragment_texture::aniso_bias() const u8 fragment_texture::aniso_bias() const