anv: Allow vp_info to be NULL in 3DSTATE_CLIP code.

pViewportState may be NULL if rasterization is disabled.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Kenneth Graunke 2016-09-29 11:52:34 -07:00
parent ba38a9d380
commit 2871d4d687
1 changed files with 1 additions and 1 deletions

View File

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