ac/llvm: convert src operands to pointers if necessary
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Nov 2019 14:32:45 +0000 (15:32 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 28 Nov 2019 07:26:51 +0000 (08:26 +0100)
commit52aadbfd04e464ac6b9bfddce05e3276f7bc53fc
tree11c6b3710d938d094abe3ec1897e0dfec567dd6f
parent18f896e55d96c63b11de7ed0cbe484988a1184c5
ac/llvm: convert src operands to pointers if necessary

To avoid generating invalid LLVM IR when both operands don't have
the same type. This might happen when performing pointer comparisons
with SPIRV 1.4.

Fixes invalid LLVM IR for:
dEQP-VK.spirv_assembly.instruction.spirv1p4.opptrequal.variable_pointers_ssbo_equal
dEQP-VK.spirv_assembly.instruction.spirv1p4.opptrnotequal.variable_pointers_ssbo_not_equal

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/llvm/ac_nir_to_llvm.c