mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
nir/builder: Use a normal temporary array in nir_channel
C++ gets cranky if we take references of temporaries. This isn't a problem yet in master because nir_builder is never used from C++. However, it will be in the future so we should fix it now. Reviewed-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
18385bc3ac
commit
cb503c3227
1 changed files with 2 additions and 1 deletions
|
|
@ -219,7 +219,8 @@ nir_swizzle(nir_builder *build, nir_ssa_def *src, unsigned swiz[4],
|
|||
static inline nir_ssa_def *
|
||||
nir_channel(nir_builder *b, nir_ssa_def *def, int c)
|
||||
{
|
||||
return nir_swizzle(b, def, (unsigned[4]){c, c, c, c}, 1, false);
|
||||
unsigned swizzle[4] = {c, c, c, c};
|
||||
return nir_swizzle(b, def, swizzle, 1, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue