mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Implement proper decoding for some obscure fragment instructions
PK4UBG and UP4UBG were dropped from the NV_fragment_program spec in 2002. Not much information about them remains but seems pretty straightforward.
This commit is contained in:
parent
11ab9b7fa9
commit
39815801aa
6 changed files with 47 additions and 8 deletions
|
@ -673,7 +673,7 @@ namespace glsl
|
|||
"}\n\n";
|
||||
}
|
||||
|
||||
if (!props.fp32_outputs)
|
||||
if (!props.fp32_outputs || props.require_linear_to_srgb)
|
||||
{
|
||||
OS <<
|
||||
"vec4 linear_to_srgb(const in vec4 cl)\n"
|
||||
|
@ -685,6 +685,17 @@ namespace glsl
|
|||
"}\n\n";
|
||||
}
|
||||
|
||||
if (props.require_texture_ops || props.require_srgb_to_linear)
|
||||
{
|
||||
OS <<
|
||||
"vec4 srgb_to_linear(const in vec4 cs)\n"
|
||||
"{\n"
|
||||
" vec4 a = cs / 12.92;\n"
|
||||
" vec4 b = pow((cs + 0.055) / 1.055, vec4(2.4));\n"
|
||||
" return _select(a, b, greaterThan(cs, vec4(0.04045)));\n"
|
||||
"}\n\n";
|
||||
}
|
||||
|
||||
if (props.require_depth_conversion)
|
||||
{
|
||||
ensure(props.require_texture_ops);
|
||||
|
@ -763,12 +774,6 @@ namespace glsl
|
|||
" return mix(direct, indexed, choice);\n"
|
||||
"}\n\n"
|
||||
#endif
|
||||
"vec4 srgb_to_linear(const in vec4 cs)\n"
|
||||
"{\n"
|
||||
" vec4 a = cs / 12.92;\n"
|
||||
" vec4 b = pow((cs + 0.055) / 1.055, vec4(2.4));\n"
|
||||
" return _select(a, b, greaterThan(cs, vec4(0.04045)));\n"
|
||||
"}\n\n"
|
||||
|
||||
//TODO: Move all the texture read control operations here
|
||||
"vec4 process_texel(in vec4 rgba, const in uint control_bits)\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue