diff options
author | Eric Anholt <[email protected]> | 2010-10-07 22:37:36 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-08 10:24:30 -0700 |
commit | 5b24d69fcd6359dc959ec465c7e77b4626a27e72 (patch) | |
tree | 75cf195abed8b0b97455720037fce4b06930c187 /src/mesa/drivers | |
parent | 0534e958c9d7fc854b64ad38964863e895e5a317 (diff) |
i965: Handle swizzles in the addition of YUV texture constants.
If someone happened to land a set in a different swizzle order, we
would have assertion failed.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_fp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index da3d3486cea..af1fda86513 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -549,6 +549,7 @@ static struct prog_src_register search_or_add_const4f( struct brw_wm_compile *c, GLfloat values[4]; GLuint idx; GLuint swizzle; + struct prog_src_register reg; values[0] = s0; values[1] = s1; @@ -556,8 +557,10 @@ static struct prog_src_register search_or_add_const4f( struct brw_wm_compile *c, values[3] = s3; idx = _mesa_add_unnamed_constant( paramList, values, 4, &swizzle ); - assert(swizzle == SWIZZLE_NOOP); /* Need to handle swizzle in reg setup */ - return src_reg(PROGRAM_STATE_VAR, idx); + reg = src_reg(PROGRAM_STATE_VAR, idx); + reg.Swizzle = swizzle; + + return reg; } |