ac: add missing 16-bit types to glsl_base_to_llvm_type()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 14 Jan 2019 16:55:18 +0000 (17:55 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 14 Jan 2019 20:18:23 +0000 (21:18 +0100)
Fix crashes with
dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.*16

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

index 62ee9259836a5b6ec96fea9ab1118d90adaf7a80..81a4149c3217523be0799a2c5754c48e70cc8afb 100644 (file)
@@ -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;