Mesa (master): radeonsi: make wait_mem_scratch unmappable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 26 07:16:56 UTC 2020


Module: Mesa
Branch: master
Commit: 3b1e42d2c228730fb3c04646e45b82c5e7059b6c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b1e42d2c228730fb3c04646e45b82c5e7059b6c

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Jun 19 20:54:58 2020 -0400

radeonsi: make wait_mem_scratch unmappable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5603>

---

 src/gallium/drivers/radeonsi/si_pipe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 99fa2b40c7a..91913c7aceb 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -599,7 +599,10 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
    }
 
    if (sctx->chip_class >= GFX9 || si_compute_prim_discard_enabled(sctx)) {
-      sctx->wait_mem_scratch = si_resource(pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT, 8));
+      sctx->wait_mem_scratch =
+           si_aligned_buffer_create(screen, SI_RESOURCE_FLAG_UNMAPPABLE,
+                                    PIPE_USAGE_DEFAULT, 8,
+                                    sscreen->info.tcc_cache_line_size);
       if (!sctx->wait_mem_scratch)
          goto fail;
 



More information about the mesa-commit mailing list