mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
ptn,ttn: Use nir_channel for selecting channels
Both of these passes predate the nir_channel helper. We should just use it instead of hand-rolling it in both passes. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
88eb2a1f7e
commit
6c2ca2a5d3
2 changed files with 2 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ struct ttn_compile {
|
|||
#define ttn_swizzle(b, src, x, y, z, w) \
|
||||
nir_swizzle(b, src, SWIZ(x, y, z, w), 4, false)
|
||||
#define ttn_channel(b, src, swiz) \
|
||||
nir_swizzle(b, src, SWIZ(swiz, swiz, swiz, swiz), 1, false)
|
||||
nir_channel(b, src, TGSI_SWIZZLE_##swiz)
|
||||
|
||||
static gl_varying_slot
|
||||
tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ struct ptn_compile {
|
|||
|
||||
#define SWIZ(X, Y, Z, W) \
|
||||
(unsigned[4]){ SWIZZLE_##X, SWIZZLE_##Y, SWIZZLE_##Z, SWIZZLE_##W }
|
||||
#define ptn_channel(b, src, ch) nir_swizzle(b, src, SWIZ(ch, ch, ch, ch), 1, true)
|
||||
#define ptn_channel(b, src, ch) nir_channel(b, src, SWIZZLE_##ch)
|
||||
|
||||
static nir_ssa_def *
|
||||
ptn_src_for_dest(struct ptn_compile *c, nir_alu_dest *dest)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue