Mesa (master): ac: handle pointer types to LDS in ac_get_elem_bits()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 12 08:01:33 UTC 2019
Module: Mesa
Branch: master
Commit: bef7b2f805f20661733ecc6b6499551d83c512e3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bef7b2f805f20661733ecc6b6499551d83c512e3
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon Nov 11 11:34:05 2019 +0100
ac: handle pointer types to LDS in ac_get_elem_bits()
This fixes crashes with some
dEQP-VK.spirv_assembly.instruction.spirv1p4.* tests.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/amd/llvm/ac_llvm_build.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index ece2b3f42cb..4515f696e74 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -177,6 +177,11 @@ ac_get_elem_bits(struct ac_llvm_context *ctx, LLVMTypeRef type)
if (LLVMGetTypeKind(type) == LLVMIntegerTypeKind)
return LLVMGetIntTypeWidth(type);
+ if (LLVMGetTypeKind(type) == LLVMPointerTypeKind) {
+ if (LLVMGetPointerAddressSpace(type) == AC_ADDR_SPACE_LDS)
+ return 32;
+ }
+
if (type == ctx->f16)
return 16;
if (type == ctx->f32)
More information about the mesa-commit
mailing list