pan/mdg: Include more types

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
This commit is contained in:
Alyssa Rosenzweig 2020-05-07 13:43:13 -04:00 committed by Marge Bot
parent e9a4bd90a8
commit 8084fc3b66
4 changed files with 11 additions and 1 deletions

View File

@ -554,6 +554,7 @@ v_load_store_scratch(
midgard_instruction ins = {
.type = TAG_LOAD_STORE_4,
.mask = mask,
.dest_type = nir_type_uint32,
.dest = ~0,
.src = { ~0, ~0, ~0, ~0 },
.swizzle = SWIZZLE_IDENTITY_4,
@ -573,6 +574,7 @@ v_load_store_scratch(
if (is_store) {
ins.src[0] = srcdest;
ins.src_types[0] = nir_type_uint32;
/* Ensure we are tightly swizzled so liveness analysis is
* correct */

View File

@ -1588,8 +1588,10 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
ld.load_store.arg_2 = 0x1E;
}
for (unsigned c = 2; c < 16; ++c)
for (unsigned c = 4; c < 16; ++c)
ld.swizzle[0][c] = 0;
ld.dest_type = nir_type_float16;
}
emit_mir_instruction(ctx, ld);

View File

@ -116,7 +116,9 @@ midgard_opt_combine_projection(compiler_context *ctx, midgard_block *block)
.type = TAG_LOAD_STORE_4,
.mask = ins->mask,
.dest = to,
.dest_type = nir_type_float32,
.src = { frcp_from, ~0, ~0, ~0 },
.src_types = { nir_type_float32 },
.swizzle = SWIZZLE_IDENTITY_4,
.load_store = {
.op = frcp_component == COMPONENT_W ?

View File

@ -440,6 +440,10 @@ mir_flip(midgard_instruction *ins)
ins->alu.src1 = ins->alu.src2;
ins->alu.src2 = temp;
temp = ins->src_types[0];
ins->src_types[0] = ins->src_types[1];
ins->src_types[1] = temp;
unsigned temp_swizzle[16];
memcpy(temp_swizzle, ins->swizzle[0], sizeof(ins->swizzle[0]));
memcpy(ins->swizzle[0], ins->swizzle[1], sizeof(ins->swizzle[0]));