microsoft/compiler: Handle i1 overloads
authorJesse Natalie <jenatali@microsoft.com>
Thu, 19 Jan 2023 21:24:42 +0000 (13:24 -0800)
committerJesse Natalie <jenatali@microsoft.com>
Tue, 24 Jan 2023 19:00:05 +0000 (11:00 -0800)
Some wave ops can have bool/i1 overloads

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>

src/microsoft/compiler/dxil_enums.c
src/microsoft/compiler/dxil_enums.h
src/microsoft/compiler/dxil_module.c
src/microsoft/compiler/nir_to_dxil.c

index 9d29e49..9607457 100644 (file)
@@ -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",
index ae421d6..7241de1 100644 (file)
@@ -197,6 +197,7 @@ enum dxil_interpolation_mode  {
 
 enum overload_type {
    DXIL_NONE,
+   DXIL_I1,
    DXIL_I16,
    DXIL_I32,
    DXIL_I64,
index cb44c99..89cdfac 100644 (file)
@@ -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);
index 948412d..899462e 100644 (file)
@@ -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;