Module: Mesa Branch: master Commit: 56bda0fb4947356931463833c7864998a1e96452 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=56bda0fb4947356931463833c7864998a1e96452
Author: Alyssa Rosenzweig <[email protected]> Date: Tue Nov 3 08:23:01 2020 -0500 pan/bi: Track tex data register swizzles So we can pass through a .z component. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7408> --- src/panfrost/bifrost/bifrost_compile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 442128f3772..0313fcf3e52 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1699,6 +1699,7 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr) /* 32-bit indices to be allocated as consecutive data registers. */ unsigned dregs[BIFROST_TEX_DREG_COUNT] = { 0 }; + unsigned dregs_swiz[BIFROST_TEX_DREG_COUNT] = { 0 }; for (unsigned i = 0; i < instr->num_srcs; ++i) { unsigned index = pan_src_index(&instr->src[i].src); @@ -1781,8 +1782,10 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr) for (unsigned i = 0; i < ARRAY_SIZE(dregs); ++i) { assert(dreg_index < 4); - if (dregs[i]) + if (dregs[i]) { + combine.swizzle[dreg_index][0] = dregs_swiz[i]; combine.src[dreg_index++] = dregs[i]; + } } if (dreg_index > 1) { @@ -1794,6 +1797,7 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr) tex.swizzle[0][i] = i; } else if (dreg_index == 1) { tex.src[0] = combine.src[0]; + tex.swizzle[0][0] = combine.swizzle[0][0]; } else { tex.src[0] = tex.dest; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
