From fef493f745da9304da8f750788e498e1f4f31206 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 31 Mar 2023 08:39:04 -0400 Subject: [PATCH] lavapipe: more correctly handle null pipeline states it's not necessary to check whether dynamic states are set before the null checks since any issues there would be VU errors Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/frontends/lavapipe/lvp_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 3be265f0f40..00c64a28625 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -895,7 +895,8 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline, MESA_VK_DYNAMIC_TS_DOMAIN_ORIGIN)) { pipeline->shaders[MESA_SHADER_TESS_EVAL].tess_ccw = create_pipeline_nir(nir_shader_clone(NULL, pipeline->shaders[MESA_SHADER_TESS_EVAL].pipeline_nir->nir)); pipeline->shaders[MESA_SHADER_TESS_EVAL].tess_ccw->nir->info.tess.ccw = !pipeline->shaders[MESA_SHADER_TESS_EVAL].pipeline_nir->nir->info.tess.ccw; - } else if (pipeline->graphics_state.ts->domain_origin == VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT) { + } else if (pipeline->graphics_state.ts && + pipeline->graphics_state.ts->domain_origin == VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT) { pipeline->shaders[MESA_SHADER_TESS_EVAL].pipeline_nir->nir->info.tess.ccw = !pipeline->shaders[MESA_SHADER_TESS_EVAL].pipeline_nir->nir->info.tess.ccw; } }