Mesa (master): ac/nir: adjust an assertion for D16 on GFX6-GFX7

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 8 07:09:16 UTC 2020


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jun  4 09:28:16 2020 +0200

ac/nir: adjust an assertion for D16 on GFX6-GFX7

16-bit types can be used with MUBUF on GFX6-GFX7.

Fixes: c3e0ba52a0a ("ac/nir: support 16-bit data in buffer_load_format opcodes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5325>

---

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

diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index ef4e79c85f0..69b1deaa8b2 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -1315,7 +1315,8 @@ ac_build_buffer_load_common(struct ac_llvm_context *ctx,
 	char name[256], type_name[8];
 
 	/* D16 is only supported on gfx8+ */
-	assert((channel_type != ctx->f16 && channel_type != ctx->i16) ||
+	assert(!use_format ||
+	       (channel_type != ctx->f16 && channel_type != ctx->i16) ||
 	       ctx->chip_class >= GFX8);
 
 	LLVMTypeRef type = func > 1 ? LLVMVectorType(channel_type, func) : channel_type;



More information about the mesa-commit mailing list