summaryrefslogtreecommitdiff
path: root/src/panfrost
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-09-30 21:20:53 -0500
committerMarge Bot <eric+marge@anholt.net>2020-10-01 18:36:53 +0000
commit0aa08ae2f673a36709c5485679d4c89a747ec0e9 (patch)
tree9829fb0885559ee64f54c7834c9ff6e432839743 /src/panfrost
parent4c70f1ba2fb2ef0aef33d0f7f160ad110b731615 (diff)
nir: Split NIR_INTRINSIC_TYPE into separate src/dest indices
We're about to introduce conversion ops which are going to want two different types. We may as well just split the one we have rather than end up with three. There are a couple places where this is mildly inconvenient but most of the time I find it to actually be nicer. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6945>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c10
-rw-r--r--src/panfrost/midgard/midgard_compile.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 73d0809b6e1..96b4e3874a8 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -90,8 +90,8 @@ bi_load(enum bi_class T, nir_intrinsic_instr *instr)
if (info->has_dest)
load.dest = pan_dest_index(&instr->dest);
- if (info->has_dest && nir_intrinsic_has_type(instr))
- load.dest_type = nir_intrinsic_type(instr);
+ if (info->has_dest && nir_intrinsic_has_dest_type(instr))
+ load.dest_type = nir_intrinsic_dest_type(instr);
nir_src *offset = nir_get_io_offset_src(instr);
@@ -136,7 +136,7 @@ bi_emit_frag_out(bi_context *ctx, nir_intrinsic_instr *instr)
},
.src_types = {
nir_type_uint32,
- nir_intrinsic_type(instr)
+ nir_intrinsic_src_type(instr)
},
.swizzle = {
{ 0 },
@@ -161,7 +161,7 @@ bi_emit_frag_out(bi_context *ctx, nir_intrinsic_instr *instr)
BIR_INDEX_PASS | BIFROST_SRC_CONST_HI,
},
.src_types = {
- nir_intrinsic_type(instr),
+ nir_intrinsic_src_type(instr),
nir_type_uint32
},
.swizzle = {
@@ -189,7 +189,7 @@ bi_load_with_r61(enum bi_class T, nir_intrinsic_instr *instr)
ld.src[2] = BIR_INDEX_REGISTER | 62;
ld.src_types[1] = nir_type_uint32;
ld.src_types[2] = nir_type_uint32;
- ld.format = nir_intrinsic_type(instr);
+ ld.format = nir_intrinsic_dest_type(instr);
return ld;
}
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 412d836b1e5..86bfa015bbf 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1736,7 +1736,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
nir_alu_type t =
(is_ubo || is_global || is_shared) ? nir_type_uint :
(is_interp) ? nir_type_float :
- nir_intrinsic_type(instr);
+ nir_intrinsic_dest_type(instr);
t = nir_alu_type_get_base_type(t);
@@ -1948,7 +1948,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
st.load_store.arg_1 = 0x9E;
st.load_store.arg_2 = 0x1E;
- switch (nir_alu_type_get_base_type(nir_intrinsic_type(instr))) {
+ switch (nir_alu_type_get_base_type(nir_intrinsic_src_type(instr))) {
case nir_type_uint:
case nir_type_bool:
st.op = midgard_op_st_vary_32u;