driconf/Intel: Add lower_depth_range_rate option workaround for Homerun Clash misrend...
authorIllia Polishchuk <illia.a.polishchuk@globallogic.com>
Tue, 13 Sep 2022 09:22:33 +0000 (12:22 +0300)
committerMarge Bot <emma+marge@anholt.net>
Mon, 19 Sep 2022 10:08:48 +0000 (10:08 +0000)
commit74658b01d2281c34988d589a2ac1861cbbba6b96
tree1f1c5cb05d8fa5541cb8ca700eed77d4fb894c51
parentdedd8affd82aaec4b1c2c4ac01fe60e58fe16ce9
driconf/Intel: Add lower_depth_range_rate option workaround for Homerun Clash misrendering issue

Intel has different Z interpolation float point rounding
than other mesa gpus
For example gl_Position.z = 0.0 will be interpolated to
gl_FragCoord.z = 0.5 for all gpus

gl_FragCoord = -0.00000001 will be interpolated to
gl_FragCoord.z = 0.4999999702 for Intel
and rounded to gl_FragCoord.z = 0.5 for other gpus

Games with LEQUAL depth func will fail depth test on Intel
and will pass it on other gpus in such case

This workaround lowers translated depth range
and several gl_FragCoord.z coords with extra small difference
will be translated to the same UINT16\UINT24\UINT32
value of an integer depth buffer

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7199

Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18412>
16 files changed:
src/gallium/drivers/crocus/crocus_screen.c
src/gallium/drivers/crocus/crocus_screen.h
src/gallium/drivers/crocus/crocus_state.c
src/gallium/drivers/crocus/driinfo_crocus.h
src/gallium/drivers/iris/driinfo_iris.h
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_screen.h
src/gallium/drivers/iris/iris_state.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan_hasvk/anv_device.c
src/intel/vulkan_hasvk/anv_private.h
src/intel/vulkan_hasvk/genX_cmd_buffer.c
src/util/00-mesa-defaults.conf
src/util/driconf.h