From: Kenneth Graunke Date: Thu, 29 Sep 2016 18:52:34 +0000 (-0700) Subject: anv: Allow vp_info to be NULL in 3DSTATE_CLIP code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2871d4d687710fb006dce11afa20a21f3f331180;p=mesa.git 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 --- 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];