aco: only require texture coordinates to be in WQM if NSA is used

From comment in emit_mimg():
We don't need the bias, sample index, compare value or offset to be
computed in WQM but if the p_create_vector copies the coordinates, then it
needs to be in WQM.

fossil-db (GFX10.3):
Totals from 1778 (1.28% of 139391) affected shaders:
SGPRs: 105080 -> 105072 (-0.01%); split: -0.02%, +0.01%
VGPRs: 96800 -> 96776 (-0.02%); split: -0.07%, +0.05%
CodeSize: 10001120 -> 10001384 (+0.00%); split: -0.04%, +0.04%
MaxWaves: 18164 -> 18163 (-0.01%)
Instrs: 1883750 -> 1883598 (-0.01%); split: -0.06%, +0.05%
Cycles: 34800176 -> 34767840 (-0.09%); split: -0.10%, +0.01%

We don't have a p_create_vector if we use NSA.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8523>
This commit is contained in:
Rhys Perry 2021-01-14 20:00:12 +00:00 committed by Marge Bot
parent c353895c92
commit 4015b3651a
1 changed files with 1 additions and 1 deletions

View File

@ -9491,7 +9491,7 @@ void visit_tex(isel_context *ctx, nir_tex_instr *instr)
instr->sampler_dim != GLSL_SAMPLER_DIM_SUBPASS_MS;
Operand vdata = instr->is_sparse ? emit_tfe_init(bld, tmp_dst) : Operand(v1);
unsigned num_wqm_coords = implicit_derivs ? args.size() : 0;
unsigned num_wqm_coords = implicit_derivs ? coords.size() : 0;
MIMG_instruction *tex = emit_mimg(bld, opcode, Definition(tmp_dst), resource,
Operand(sampler), args, num_wqm_coords, vdata);
tex->dim = dim;