diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-27 14:25:00 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-30 17:11:08 -0500 |
commit | 66c2696fdacabd7316795781ce58e6eb5d3ce95f (patch) | |
tree | f582d37930c19bdbdd28648cee71bab9841c2665 /src | |
parent | 3996fd7b90478ea7b1da05fce41ed67716d8cd5d (diff) |
pan/midgard: Use type-appropriate st_vary
We would like to store (u)ints as well.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 64c9b23cfb4..4e2e9c985d6 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1589,6 +1589,22 @@ 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))) { + case nir_type_uint: + case nir_type_bool: + st.load_store.op = midgard_op_st_vary_32u; + break; + case nir_type_int: + st.load_store.op = midgard_op_st_vary_32i; + break; + case nir_type_float: + st.load_store.op = midgard_op_st_vary_32; + break; + default: + unreachable("Attempted to store unknown type"); + break; + } + for (unsigned i = 0; i < ARRAY_SIZE(st.swizzle[0]); ++i) st.swizzle[0][i] = MIN2(i + component, nr_comp); |