diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-01 14:54:40 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-05-04 11:08:14 -0400 |
commit | c5ef35c4334d7a9e6fdc10cbf10d6f90b963e714 (patch) | |
tree | 64dcefe84294ab11ecb0a479f43e6d7f658b3eb6 /src | |
parent | 513c774d58044447e0c7c6169a30b9537e0f8e64 (diff) |
pan/bi: Passthrough direct ld_var addresses
Don't bother wasting a constant.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bi_pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 60e3ddeab67..95c2353389a 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -169,6 +169,10 @@ bi_assign_uniform_constant_single( if (s == 0 && (ins->type == BI_LOAD_VAR_ADDRESS || ins->type == BI_LOAD_ATTR)) continue; if (ins->src[s] & BIR_INDEX_CONSTANT) { + /* Let direct addresses through */ + if (ins->type == BI_LOAD_VAR) + continue; + bool hi = false; bool b64 = nir_alu_type_get_type_size(ins->src_types[s]) > 32; uint64_t cons = bi_get_immediate(ins, s); @@ -1199,7 +1203,6 @@ bi_pack_add_ld_vary(bi_clause *clause, bi_instruction *ins, struct bi_registers if (ins->src[0] & BIR_INDEX_CONSTANT) { /* Direct uses address field directly */ packed_addr = bi_get_immediate(ins, 0); - assert(packed_addr < 0b1000); } else { /* Indirect gets an extra source */ packed_addr = bi_get_src(ins, regs, 0, false) | 0b11000; |