iris: Initialize ice->state.prim_mode to an invalid value
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Sep 2019 09:32:25 +0000 (02:32 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Sep 2019 23:31:29 +0000 (16:31 -0700)
commitc9fb704f7277b1c1303d28d35c8e145d5b55ebce
tree085a389146b774c344cad2a658337a4896a10fa5
parent7859eb13904d371d7416368ed952987b34910586
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.")
src/gallium/drivers/iris/iris_state.c