dzn: Disable depth when the rasterizer is disabled due to no position output
authorJesse Natalie <jenatali@microsoft.com>
Tue, 10 Jan 2023 00:46:14 +0000 (16:46 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 Jan 2023 20:17:42 +0000 (20:17 +0000)
commit0069ac9e6eb2ad5793be473cdd98a89c9d017998
tree54e203c14cb5dbf4100710b9d313ba50bffa6e25
parent682605a99be50161554f91fd638b35e10a4893ad
dzn: Disable depth when the rasterizer is disabled due to no position output

D3D considers the rasterizer enabled if there's a pixel shader *or* if
depth is enabled, since you can do depth-only rendering. After parsing
shaders, if we find that there was supposed to be a pixel shader, but
we removed it because there was no output position, disable depth too.

Also, store this info in the cache, since we might not even load the
nir shaders if we'd seen this pipeline before.

Fixes dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_graphics

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20617>
src/microsoft/vulkan/dzn_pipeline.c
src/microsoft/vulkan/dzn_private.h