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 <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22236>
This commit is contained in:
Mike Blumenkrantz
2023-03-31 08:39:04 -04:00
committed by Marge Bot
parent 0f510040dc
commit fef493f745

View File

@@ -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;
}
}