mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
dzn: Add a zeroed zsa state when depth or raster is disabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20617>
This commit is contained in:
parent
25d460a818
commit
682605a99b
1 changed files with 13 additions and 1 deletions
|
|
@ -1347,8 +1347,20 @@ dzn_graphics_pipeline_translate_zsa(struct dzn_device *device,
|
|||
const VkPipelineDepthStencilStateCreateInfo *in_zsa =
|
||||
in_rast->rasterizerDiscardEnable ? NULL : in->pDepthStencilState;
|
||||
|
||||
if (!in_zsa)
|
||||
if (!in_zsa ||
|
||||
in_rast->cullMode == VK_CULL_MODE_FRONT_AND_BACK) {
|
||||
/* Ensure depth is disabled if the rasterizer should be disabled / everything culled */
|
||||
if (pdev->options14.IndependentFrontAndBackStencilRefMaskSupported) {
|
||||
d3d12_gfx_pipeline_state_stream_new_desc(out, DEPTH_STENCIL2, D3D12_DEPTH_STENCIL_DESC2, stream_desc);
|
||||
pipeline->templates.desc_offsets.ds = (uintptr_t)stream_desc - (uintptr_t)out->pPipelineStateSubobjectStream;
|
||||
memset(stream_desc, 0, sizeof(*stream_desc));
|
||||
} else {
|
||||
d3d12_gfx_pipeline_state_stream_new_desc(out, DEPTH_STENCIL1, D3D12_DEPTH_STENCIL_DESC1, stream_desc);
|
||||
pipeline->templates.desc_offsets.ds = (uintptr_t)stream_desc - (uintptr_t)out->pPipelineStateSubobjectStream;
|
||||
memset(stream_desc, 0, sizeof(*stream_desc));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
D3D12_DEPTH_STENCIL_DESC2 desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue