summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_pipeline_util.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-09-29 11:52:34 -0700
committerKenneth Graunke <[email protected]>2016-10-11 22:50:19 -0700
commit2871d4d687710fb006dce11afa20a21f3f331180 (patch)
treeefa5609e448ce1bcee276c5390745fb6b7e4367f /src/intel/vulkan/genX_pipeline_util.h
parentba38a9d3803cdd43573f1c68497c54d701e911b6 (diff)
anv: Allow vp_info to be NULL in 3DSTATE_CLIP code.
pViewportState may be NULL if rasterization is disabled. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline_util.h')
-rw-r--r--src/intel/vulkan/genX_pipeline_util.h2
1 files changed, 1 insertions, 1 deletions
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];