Mesa (master): anv: Allow vp_info to be NULL in 3DSTATE_CLIP code.
Kenneth Graunke
kwg at kemper.freedesktop.org
Wed Oct 12 05:50:37 UTC 2016
Module: Mesa
Branch: master
Commit: 2871d4d687710fb006dce11afa20a21f3f331180
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2871d4d687710fb006dce11afa20a21f3f331180
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Sep 29 11:52:34 2016 -0700
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 at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/genX_pipeline_util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/genX_pipeline_util.h b/src/intel/vulkan/genX_pipeline_util.h
index 0ff92f1..b5142ac 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];
More information about the mesa-commit
mailing list