From ad6ceb2872be1c49518346c556a7cc94c03fbf8c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 14 Jan 2019 17:55:18 +0100 Subject: [PATCH] ac: add missing 16-bit types to glsl_base_to_llvm_type() Fix crashes with dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.*16 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 62ee9259836..81a4149c321 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3913,8 +3913,13 @@ glsl_base_to_llvm_type(struct ac_llvm_context *ac, case GLSL_TYPE_BOOL: case GLSL_TYPE_SUBROUTINE: return ac->i32; - case GLSL_TYPE_FLOAT: /* TODO handle mediump */ + case GLSL_TYPE_INT16: + case GLSL_TYPE_UINT16: + return ac->i16; + case GLSL_TYPE_FLOAT: return ac->f32; + case GLSL_TYPE_FLOAT16: + return ac->f16; case GLSL_TYPE_INT64: case GLSL_TYPE_UINT64: return ac->i64; -- 2.30.2