v3d: fix flushing of SSBOs and shader images
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 9 Aug 2019 11:02:32 +0000 (13:02 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 13 Aug 2019 06:25:15 +0000 (08:25 +0200)
commitf1559ca922de9e31f70b72a1f8fb3b1fbfe7d5ca
tree4857adbc06d951798330ed9cba47be088f2c75cf
parent1021abab07ebb29957dec5fa0cc8e90a53efd290
v3d: fix flushing of SSBOs and shader images

If the current draw call includes SSBOs, then we must flush any jobs
that are writing to the same SSBOs (so that our SSBOs reads are correct),
as well as jobs reading from the same SSBO (so that our SSBO writes don't
stomp previous SSBO reads).

The exact same logic applies to shader images. In this case we were already
flushing previous writes, but we should also flush previous reads.

Note that We don't need to call v3d_flush_jobs_reading_resource() and
v3d_flush_jobs_writing_resource() separately though, since flushing
jobs that read a resource also flushes those writing to it.

Suggested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/v3d/v3dx_draw.c