panfrost: Set `initialized` more conservatively
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 21 Jul 2020 20:05:20 +0000 (16:05 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Aug 2020 13:59:19 +0000 (09:59 -0400)
In case Gallium doesn't ask for direct but we give a direct mapping
anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159>

src/gallium/drivers/panfrost/pan_resource.c

index e647a6c7f8bd6ade4577517ce09ad6553e2e2656..8a9dd549d7bc32f770cf63052be453651c89f3be 100644 (file)
@@ -680,7 +680,7 @@ panfrost_transfer_map(struct pipe_context *pctx,
                 /* By mapping direct-write, we're implicitly already
                  * initialized (maybe), so be conservative */
 
-                if ((usage & PIPE_TRANSFER_WRITE) && (usage & PIPE_TRANSFER_MAP_DIRECTLY)) {
+                if (usage & PIPE_TRANSFER_WRITE) {
                         rsrc->slices[level].initialized = true;
                         panfrost_minmax_cache_invalidate(rsrc->index_cache, &transfer->base);
                 }