From: Jesse Natalie Date: Thu, 19 Jan 2023 21:24:42 +0000 (-0800) Subject: microsoft/compiler: Handle i1 overloads X-Git-Tag: upstream/23.3.3~14116 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a318c101bb9eb711d0279b3031b84c44d0f1322f;p=platform%2Fupstream%2Fmesa.git microsoft/compiler: Handle i1 overloads Some wave ops can have bool/i1 overloads Part-of: --- diff --git a/src/microsoft/compiler/dxil_enums.c b/src/microsoft/compiler/dxil_enums.c index 9d29e49..9607457 100644 --- a/src/microsoft/compiler/dxil_enums.c +++ b/src/microsoft/compiler/dxil_enums.c @@ -155,6 +155,7 @@ enum dxil_primitive_topology dxil_get_primitive_topology(enum shader_prim topolo static const char *overload_str[DXIL_NUM_OVERLOADS] = { [DXIL_NONE] = "", + [DXIL_I1] = "i1", [DXIL_I16] = "i16", [DXIL_I32] = "i32", [DXIL_I64] = "i64", diff --git a/src/microsoft/compiler/dxil_enums.h b/src/microsoft/compiler/dxil_enums.h index ae421d6..7241de1 100644 --- a/src/microsoft/compiler/dxil_enums.h +++ b/src/microsoft/compiler/dxil_enums.h @@ -197,6 +197,7 @@ enum dxil_interpolation_mode { enum overload_type { DXIL_NONE, + DXIL_I1, DXIL_I16, DXIL_I32, DXIL_I64, diff --git a/src/microsoft/compiler/dxil_module.c b/src/microsoft/compiler/dxil_module.c index cb44c99..89cdfac 100644 --- a/src/microsoft/compiler/dxil_module.c +++ b/src/microsoft/compiler/dxil_module.c @@ -675,6 +675,7 @@ const struct dxil_type * dxil_get_overload_type(struct dxil_module *mod, enum overload_type overload) { switch (overload) { + case DXIL_I1: return get_int1_type(mod); case DXIL_I16: return get_int16_type(mod); case DXIL_I32: return get_int32_type(mod); case DXIL_I64: return get_int64_type(mod); diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 948412d..899462e 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -2215,6 +2215,7 @@ get_overload(nir_alu_type alu_type, unsigned bit_size) case nir_type_int: case nir_type_uint: switch (bit_size) { + case 1: return DXIL_I1; case 16: return DXIL_I16; case 32: return DXIL_I32; case 64: return DXIL_I64;