From 3e1431dee93e43777096ad4d00e0c4f9317fe795 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 31 May 2023 15:27:30 -0400 Subject: [PATCH] zink: don't check prog->shaders when creating gfx pipeline these objects don't technically belong to the pipeline, and checking them may lead to inconsistent results in some corner cases Part-of: --- src/gallium/drivers/zink/zink_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index 523e048..bc3a667 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -370,7 +370,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen, VkPipelineTessellationStateCreateInfo tci = {0}; VkPipelineTessellationDomainOriginStateCreateInfo tdci = {0}; - if (prog->shaders[MESA_SHADER_TESS_CTRL] && prog->shaders[MESA_SHADER_TESS_EVAL]) { + if (objs[MESA_SHADER_TESS_CTRL].mod && objs[MESA_SHADER_TESS_EVAL].mod) { tci.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO; tci.patchControlPoints = state->dyn_state2.vertices_per_patch; pci.pTessellationState = &tci; @@ -383,7 +383,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen, VkShaderModuleCreateInfo smci[ZINK_GFX_SHADER_COUNT] = {0}; uint32_t num_stages = 0; for (int i = 0; i < ZINK_GFX_SHADER_COUNT; ++i) { - if (!prog->shaders[i]) + if (!objs[i].obj) continue; VkPipelineShaderStageCreateInfo stage = {0}; -- 2.7.4