Mesa (main): radeonsi: set size in si_texture_get_handle

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 08:12:05 UTC 2022


Module: Mesa
Branch: main
Commit: b81f05e94d485fbce98c3a6c5d21105da33dca7b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b81f05e94d485fbce98c3a6c5d21105da33dca7b

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Wed Jun  1 10:48:58 2022 +0200

radeonsi: set size in si_texture_get_handle

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6507
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6491
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813>

---

 src/gallium/drivers/radeonsi/si_texture.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index a736221ea40..4dceda3d615 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -691,6 +691,8 @@ static bool si_texture_get_handle(struct pipe_screen *screen, struct pipe_contex
       if (resource->nr_samples > 1 || tex->is_depth)
          return false;
 
+      whandle->size = tex->buffer.bo_size;
+
       if (plane) {
          whandle->offset = ac_surface_get_plane_offset(sscreen->info.gfx_level,
                                                        &tex->surface, plane, 0);



More information about the mesa-commit mailing list