From 2871d4d687710fb006dce11afa20a21f3f331180 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 29 Sep 2016 11:52:34 -0700 Subject: anv: Allow vp_info to be NULL in 3DSTATE_CLIP code. pViewportState may be NULL if rasterization is disabled. Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand --- src/intel/vulkan/genX_pipeline_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/intel/vulkan/genX_pipeline_util.h') diff --git a/src/intel/vulkan/genX_pipeline_util.h b/src/intel/vulkan/genX_pipeline_util.h index 0ff92f16ef8..b5142ac9a6f 100644 --- a/src/intel/vulkan/genX_pipeline_util.h +++ b/src/intel/vulkan/genX_pipeline_util.h @@ -948,7 +948,7 @@ emit_3dstate_clip(struct anv_pipeline *pipeline, clip.MinimumPointWidth = 0.125; clip.MaximumPointWidth = 255.875; - clip.MaximumVPIndex = vp_info->viewportCount - 1; + clip.MaximumVPIndex = (vp_info ? vp_info->viewportCount : 1) - 1; #if GEN_GEN == 7 clip.FrontWinding = vk_to_gen_front_face[rs_info->frontFace]; -- cgit v1.2.3