diff options
author | Samuel Pitoiset <[email protected]> | 2019-11-11 11:34:05 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-11-12 08:32:15 +0100 |
commit | bef7b2f805f20661733ecc6b6499551d83c512e3 (patch) | |
tree | bd7e9e1d24d7efa9641003879333e7ce77830301 | |
parent | 01cae57c80839fcb0defc76f450f1938e96e8ae7 (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/amd/llvm/ac_llvm_build.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |