mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
rsx: Fix low precision shader option
This commit is contained in:
parent
b639f3c8ec
commit
a97424d46c
1 changed files with 3 additions and 2 deletions
|
@ -531,8 +531,9 @@ namespace glsl
|
||||||
|
|
||||||
// 8-bit rounding/quantization
|
// 8-bit rounding/quantization
|
||||||
{
|
{
|
||||||
const auto _255 = (props.supports_native_fp16) ? "f16vec4(255.)" : "vec4(255.)";
|
const auto _16bit_outputs = (!props.fp32_outputs && props.supports_native_fp16);
|
||||||
const auto _1_over_2 = (props.supports_native_fp16) ? "f16vec4(0.5)" : "vec4(0.5)";
|
const auto _255 = _16bit_outputs ? "f16vec4(255.)" : "vec4(255.)";
|
||||||
|
const auto _1_over_2 = _16bit_outputs ? "f16vec4(0.5)" : "vec4(0.5)";
|
||||||
OS << "#define round_to_8bit(v4) (floor(fma(v4, " << _255 << ", " << _1_over_2 << ")) / " << _255 << ")\n\n";
|
OS << "#define round_to_8bit(v4) (floor(fma(v4, " << _255 << ", " << _1_over_2 << ")) / " << _255 << ")\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue