ac/nir: don't put lod into args if it's zero.
If it's zero but put it in args we still end up consuming a register for it. This fixes some spilling in the NIR paths in Dirt Rally that isn't seen with TGSI. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
38e91e2b81
commit
fb077b0728
|
@ -5070,8 +5070,7 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pack LOD */
|
/* Pack LOD */
|
||||||
if (lod && ((instr->op == nir_texop_txl && !lod_is_zero) ||
|
if (lod && ((instr->op == nir_texop_txl || instr->op == nir_texop_txf) && !lod_is_zero)) {
|
||||||
instr->op == nir_texop_txf)) {
|
|
||||||
address[count++] = lod;
|
address[count++] = lod;
|
||||||
} else if (instr->op == nir_texop_txf_ms && sample_index) {
|
} else if (instr->op == nir_texop_txf_ms && sample_index) {
|
||||||
address[count++] = sample_index;
|
address[count++] = sample_index;
|
||||||
|
|
Loading…
Reference in New Issue