mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-08 09:09:46 +00:00
rsx: Rework gamma override mask from RGBA to ARGB to match other per-channel mask registers
This commit is contained in:
parent
a5e455d8ed
commit
b5dcfb3431
2 changed files with 5 additions and 3 deletions
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue