mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 06:00:10 +01:00
pan/bi: Support the case where TEXC needs 0 or 1 staging reg
No need to add a COMBINE instruction if TEXC only needs zero or one staging reg. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
This commit is contained in:
parent
4aff27a68a
commit
d33c8afe9b
1 changed files with 6 additions and 2 deletions
|
|
@ -1471,13 +1471,17 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr)
|
|||
combine.src[dreg_index++] = dregs[i];
|
||||
}
|
||||
|
||||
/* Pass combined data registers together */
|
||||
if (dreg_index > 0) {
|
||||
if (dreg_index > 1) {
|
||||
/* Pass combined data registers together */
|
||||
tex.src[0] = combine.dest;
|
||||
bi_emit(ctx, combine);
|
||||
|
||||
for (unsigned i = 0; i < dreg_index; ++i)
|
||||
tex.swizzle[0][i] = i;
|
||||
} else if (dreg_index == 1) {
|
||||
tex.src[0] = combine.src[0];
|
||||
} else {
|
||||
tex.src[0] = tex.dest;
|
||||
}
|
||||
|
||||
/* Pass the texture operation descriptor in src2 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue