v3d: Fill in the ignored segment size fields to appease new simulator.
authorEric Anholt <eric@anholt.net>
Thu, 25 Apr 2019 00:25:08 +0000 (17:25 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 26 Apr 2019 19:40:31 +0000 (12:40 -0700)
We are assured that the input segment size field is ignored for
!separate_segs mode, and now the simulator wants an in-range value set
regardless of whether it's functionally ignored or not.

src/gallium/drivers/v3d/v3dx_draw.c

index 14e95c71204c7c31ad6c411af33ccf81f6f7b40d..486b6cc9b123427aeb81c3dfff39204adf2b7661 100644 (file)
@@ -261,9 +261,11 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
                         v3d->prog.vs->prog_data.vs->separate_segments;
 
                 shader.coordinate_shader_input_vpm_segment_size =
-                        v3d->prog.cs->prog_data.vs->vpm_input_size;
+                        v3d->prog.cs->prog_data.vs->separate_segments ?
+                        v3d->prog.cs->prog_data.vs->vpm_input_size : 1;
                 shader.vertex_shader_input_vpm_segment_size =
-                        v3d->prog.vs->prog_data.vs->vpm_input_size;
+                        v3d->prog.vs->prog_data.vs->separate_segments ?
+                        v3d->prog.vs->prog_data.vs->vpm_input_size : 1;
 
                 shader.coordinate_shader_output_vpm_segment_size =
                         v3d->prog.cs->prog_data.vs->vpm_output_size;