panfrost: Don't flush readers for reads

Unsure if this can actually be hit, but bug fix by inspection: there is no need
to flush for read-after-read relationships.

This might be a bit faster, shrug.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20426>
This commit is contained in:
Alyssa Rosenzweig 2022-11-30 19:00:34 -05:00 committed by Marge Bot
parent 3c56b9c7a3
commit 182087245d

View file

@ -234,8 +234,12 @@ panfrost_batch_update_access(struct panfrost_batch *batch,
struct hash_entry *entry = _mesa_hash_table_search(ctx->writers, rsrc);
struct panfrost_batch *writer = entry ? entry->data : NULL;
/* Flush users if required */
if (writes || ((writer != NULL) && (writer != batch))) {
/* Both reads and writes flush the existing writer */
if (writer != NULL && writer != batch)
panfrost_batch_submit(ctx, writer);
/* Writes (only) flush readers too */
if (writes) {
unsigned i;
foreach_batch(ctx, i) {
struct panfrost_batch *batch = &ctx->batches.slots[i];