Mesa (staging/19.1): iris: Initialize ice->state.prim_mode to an invalid value

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 20 11:10:26 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 4d45999a24d210edd491d86d24bdbdef091ece7d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d45999a24d210edd491d86d24bdbdef091ece7d

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Sep 13 02:32:25 2019 -0700

iris: Initialize ice->state.prim_mode to an invalid value

It was calloc'd to 0 which is PIPE_PRIM_POINTS, which means that we
fail to notice an initial primitive of points being new, and fail at
updating the "primitive is points or lines" field.

We do not need to reset this on device loss because we're tracking
the last primitive mode sent to us on the CPU via draw_vbo, not the
last primitive mode sent to the GPU.

Fixes several tests:
- dEQP-GLES3.functional.clipping.point.wide_point_clip
- dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center
- dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner

Fixes: dcfca0af7c5 ("iris: Set XY Clipping correctly.")
(cherry picked from commit c9fb704f7277b1c1303d28d35c8e145d5b55ebce)

---

 src/gallium/drivers/iris/iris_state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index f1b7e631892..3a6715f4048 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -6484,6 +6484,7 @@ genX(init_state)(struct iris_context *ice)
 
    ice->state.sample_mask = 0xffff;
    ice->state.num_viewports = 1;
+   ice->state.prim_mode = PIPE_PRIM_MAX;
    ice->state.genx = calloc(1, sizeof(struct iris_genx_state));
 
    /* Make a 1x1x1 null surface for unbound textures */




More information about the mesa-commit mailing list