From 66c2696fdacabd7316795781ce58e6eb5d3ce95f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 27 Dec 2019 14:25:00 -0500 Subject: pan/midgard: Use type-appropriate st_vary We would like to store (u)ints as well. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') 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); -- cgit v1.2.3