summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2021-10-27 16:58:10 -0400
committerDylan Baker <dylan.c.baker@intel.com>2021-11-01 10:30:23 -0700
commit15011982b552bdea7b98aef659557b5afa678238 (patch)
tree01dbb6e597286085bd9edfd1474ad48c3bca82bd
parent9ff1f615c1cc40c25dc651301904dfed3387cf1d (diff)
zink: add more int/float types to cast switching in ntv
these come from opcode results, which are not always 32bit cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562> (cherry picked from commit c73f5a00826201f6e76854145aa823cec4f389d2)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c16
2 files changed, 17 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 7fd046f583f..bc3a8870336 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -22,7 +22,7 @@
"description": "zink: add more int/float types to cast switching in ntv",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index e579f1eb083..8ddfc5c3442 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -1170,10 +1170,18 @@ store_dest(struct ntv_context *ctx, nir_dest *dest, SpvId result, nir_alu_type t
break;
case nir_type_uint:
+ case nir_type_uint8:
+ case nir_type_uint16:
+ case nir_type_uint64:
break; /* nothing to do! */
case nir_type_int:
+ case nir_type_int8:
+ case nir_type_int16:
+ case nir_type_int64:
case nir_type_float:
+ case nir_type_float16:
+ case nir_type_float64:
result = bitcast_to_uvec(ctx, result, bit_size, num_components);
break;
@@ -1533,12 +1541,20 @@ get_dest_type(struct ntv_context *ctx, nir_dest *dest, nir_alu_type type)
unreachable("bool should have bit-size 1");
case nir_type_int:
+ case nir_type_int8:
+ case nir_type_int16:
+ case nir_type_int64:
return get_ivec_type(ctx, bit_size, num_components);
case nir_type_uint:
+ case nir_type_uint8:
+ case nir_type_uint16:
+ case nir_type_uint64:
return get_uvec_type(ctx, bit_size, num_components);
case nir_type_float:
+ case nir_type_float16:
+ case nir_type_float64:
return get_fvec_type(ctx, bit_size, num_components);
default: