turnip: apply workaround for depth bounds test without depth test
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Tue, 17 Aug 2021 11:59:56 +0000 (14:59 +0300)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Aug 2021 10:25:58 +0000 (10:25 +0000)
commitbb4db22ff43a708bf80a8f72913ee493313393d1
tree56a3fad072562b73ca2c32094ec2a4f3b2e73bd6
parent7faee1430a876afba64a6bf837c99d9a1fb25986
turnip: apply workaround for depth bounds test without depth test

On some GPUs when:
- depth bounds test is enabled
- depth test is disabled
- depth attachment uses UBWC in sysmem mode
GPU hangs. As a workaround we should enable z test. That's what blob
is doing for a630. And since we enable z test we should make it always pass.

Blob doesn't emit this workaround on a650 and a660. Untested on a640.

Fixes:
 dEQP-VK.pipeline.extended_dynamic_state.two_draws_static.depth_bounds_test_disable
 dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_bounds_test_disable
 dEQP-VK.dynamic_state.ds_state.depth_bounds_1

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12407>
src/freedreno/common/freedreno_dev_info.h
src/freedreno/common/freedreno_devices.py
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_pipeline.c
src/freedreno/vulkan/tu_private.h