OSDN Git Service

vc4: Fix miscalculation of the VPM space.
authorEric Anholt <eric@anholt.net>
Sat, 10 Jan 2015 01:34:16 +0000 (14:34 +1300)
committerEric Anholt <eric@anholt.net>
Sat, 10 Jan 2015 01:35:06 +0000 (14:35 +1300)
We pass in a byte offset, not dword.  I'm rather scared that this actually
managed to pass piglit, but it does fix gears.

src/gallium/drivers/vc4/vc4_draw.c

index 77e9821..cc3f2d4 100644 (file)
@@ -214,7 +214,7 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
                 cl_u8(&vc4->shader_rec, vpm_offset); /* VS VPM offset */
                 cl_u8(&vc4->shader_rec, vpm_offset); /* CS VPM offset */
 
-                vpm_offset += align(elem_size, 4) / 4;
+                vpm_offset += align(elem_size, 4);
 
                 if (vb->stride > 0) {
                         max_index = MIN2(max_index,