From: Samuel Pitoiset Date: Mon, 14 Jan 2019 16:55:18 +0000 (+0100) Subject: ac: add missing 16-bit types to glsl_base_to_llvm_type() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad6ceb2872be1c49518346c556a7cc94c03fbf8c;p=mesa.git 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 --- 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;