Mesa (staging/19.1): radv: Set correct metadata size for GFX9+.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 26 07:46:42 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 204a36f2705b4cee0cd0506056882f8e6e2a5d86
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=204a36f2705b4cee0cd0506056882f8e6e2a5d86

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Thu Jul 25 16:53:34 2019 +0200

radv: Set correct metadata size for GFX9+.

Without correct size, radeonsi assumes the metadata is incorrect,
which can and will cause issues.

Since the metadata is really incorrect without the size, let us
fix that.

Fixes: e43cc3e3afc "radv/gfx9: handle GFX9 opaque metadata"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
(cherry picked from commit 7e1fe81f565fb72c63705b516d3e3b4c06184fc5)

---

 src/amd/vulkan/radv_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 4233d1b7cfc..a5a7aa3767f 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -729,7 +729,8 @@ radv_query_opaque_metadata(struct radv_device *device,
 		for (i = 0; i <= image->info.levels - 1; i++)
 			md->metadata[10+i] = image->planes[0].surface.u.legacy.level[i].offset >> 8;
 		md->size_metadata = (11 + image->info.levels - 1) * 4;
-	}
+	} else
+		md->size_metadata = 10 * 4;
 }
 
 void




More information about the mesa-commit mailing list