Otherwise vertex shader can see stale cache data. This in particular
happens when the same vbo is updated and reused. Not sure yet if vbo's
at differing addresses but bound to same vertex buffer slot could have
issues, but seems safest to flush whenever new vertex buffers are bound.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
OUT_RING(ring, 0x00000000); /* XXX VFD_CONTROL_2 */
OUT_RING(ring, 0x0000fc00); /* XXX VFD_CONTROL_3 */
OUT_RING(ring, 0x00000000); /* XXX VFD_CONTROL_4 */
+
+ /* cache invalidate, otherwise vertex fetch could see
+ * stale vbo contents:
+ */
+ OUT_PKT0(ring, REG_A4XX_UCHE_INVALIDATE0, 2);
+ OUT_RING(ring, 0x00000000);
+ OUT_RING(ring, 0x00000012);
}
void