Fix depth write not working when depth test is disabled;

A classic

(cherry picked from commit 5c46d6169a)
This commit is contained in:
bjorn 2024-01-13 03:04:47 -08:00
parent 24c13e88d3
commit 1e02de6cda
1 changed files with 1 additions and 1 deletions

View File

@ -1332,7 +1332,7 @@ bool gpu_pipeline_init_graphics(gpu_pipeline* pipeline, gpu_pipeline_info* info)
VkPipelineDepthStencilStateCreateInfo depthStencil = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
.depthTestEnable = info->depth.test != GPU_COMPARE_NONE,
.depthTestEnable = info->depth.test != GPU_COMPARE_NONE || info->depth.write,
.depthWriteEnable = info->depth.write,
.depthCompareOp = compareOps[info->depth.test],
.stencilTestEnable =