mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
fix assertions in swizzle()
This commit is contained in:
parent
69ab4b23f5
commit
ace2b98dd3
1 changed files with 5 additions and 5 deletions
|
|
@ -185,12 +185,12 @@ struct i915_fp_compile {
|
|||
/* One neat thing about the UREG representation:
|
||||
*/
|
||||
static INLINE int
|
||||
swizzle(int reg, int x, int y, int z, int w)
|
||||
swizzle(int reg, uint x, uint y, uint z, uint w)
|
||||
{
|
||||
assert(x < 4);
|
||||
assert(y < 4);
|
||||
assert(z < 4);
|
||||
assert(w < 4);
|
||||
assert(x <= SRC_ONE);
|
||||
assert(y <= SRC_ONE);
|
||||
assert(z <= SRC_ONE);
|
||||
assert(w <= SRC_ONE);
|
||||
return ((reg & ~UREG_XYZW_CHANNEL_MASK) |
|
||||
CHANNEL_SRC(GET_CHANNEL_SRC(reg, x), 0) |
|
||||
CHANNEL_SRC(GET_CHANNEL_SRC(reg, y), 1) |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue