rsx: Add floor workaround for GPUs with rounding issues

- Mainly affects nvidia where x/w * w can sometimes return a value smaller than x.
  In such conditions, floor(x) will return x-1 if x is an integer which is horribly wrong and exaggerates minor precision drift to great proportions.
This commit is contained in:
kd-11 2021-06-09 01:37:59 +03:00 committed by kd-11
parent 2d3fe7ce1c
commit 20bd723e7c
4 changed files with 20 additions and 3 deletions

View file

@ -357,6 +357,7 @@ void GLFragmentProgram::Decompile(const RSXFragmentProgram& prog)
{
const auto driver_caps = gl::get_driver_caps();
decompiler.device_props.has_native_half_support = driver_caps.NV_gpu_shader5_supported || driver_caps.AMD_gpu_shader_half_float_supported;
decompiler.device_props.has_low_precision_rounding = driver_caps.vendor_NVIDIA;
}
decompiler.Task();