[Mesa-dev] [PATCH v2] ac: add missing 16-bit types to glsl_base_to_llvm_type()

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jan 14 16:55:18 UTC 2019


Fix crashes with
dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.*16

v2: - add INT16/UINT16 too
    - update commit description

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> (v1)
---
 src/amd/common/ac_nir_to_llvm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 5023b96f92d..f9a3c171b1d 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3902,8 +3902,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_INT16:
+	case GLSL_TYPE_UINT16:
+		return ac->i16;
 	case GLSL_TYPE_FLOAT: /* TODO handle mediump */
 		return ac->f32;
+	case GLSL_TYPE_FLOAT16:
+		return ac->f16;
 	case GLSL_TYPE_INT64:
 	case GLSL_TYPE_UINT64:
 		return ac->i64;
-- 
2.20.1



More information about the mesa-dev mailing list