ac/llvm: fix ac_to_integer_type() for 32-bit const addr space pointers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 21 Oct 2019 12:11:47 +0000 (14:11 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 21 Oct 2019 20:32:01 +0000 (22:32 +0200)
This fixes some crashes with dEQP-VK.descriptor_indexing.* when
read_first_invocation has its source from a descriptor.

Most of these tests still fail because of an LLVM bug (they work
with ACO).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/llvm/ac_llvm_build.c

index d9ece7049c75bf81cbdce6d6992ba5f41d70c7dd..ece2b3f42cb90757b212dc6c3c7e16fcb1934195 100644 (file)
@@ -243,6 +243,7 @@ ac_to_integer_type(struct ac_llvm_context *ctx, LLVMTypeRef t)
                switch (LLVMGetPointerAddressSpace(t)) {
                case AC_ADDR_SPACE_GLOBAL:
                        return ctx->i64;
+               case AC_ADDR_SPACE_CONST_32BIT:
                case AC_ADDR_SPACE_LDS:
                        return ctx->i32;
                default: