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@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user