From 390a1bbdb338f0f5a462920dbdc611f8f40521d3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 12 Aug 2022 13:48:06 +0200 Subject: [PATCH] radv: prevent accessing rasterization state when it's NULL It might be NULL for gfx pipeline libs. Signed-off-by: Samuel Pitoiset Reviewed-By: Mike Blumenkrantz Part-of: --- src/amd/vulkan/radv_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 5c9406fa764..0bb5dea0f4e 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2927,7 +2927,7 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin key.vs.topology = si_translate_prim(state->ia->primitive_topology); } - if (device->physical_device->rad_info.gfx_level >= GFX10) { + if (device->physical_device->rad_info.gfx_level >= GFX10 && state->rs) { key.vs.provoking_vtx_last = state->rs->provoking_vertex == VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT; }