diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-11 09:39:52 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-11 09:47:32 -0600 |
commit | 6697311b21a65dbea9236413a3afc759a592afd7 (patch) | |
tree | 77b5ca7d6be9a96af0f8f85bc108666e14049f80 /src/mesa/drivers/dri | |
parent | 7c2fe42dedcd9f437f2b3fae92963d4c4c56fe03 (diff) |
i965: handle extended swizzle terms (0,1) in get_src_reg()
Fixes failed assertion in progs/glsl/twoside.c (but still wrong rendering).
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_glsl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index efe8b5126c..2b2df7329c 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -509,6 +509,14 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c, const GLuint nr = 1; const GLuint component = GET_SWZ(src->Swizzle, channel); + /* Extended swizzle terms */ + if (component == SWIZZLE_ZERO) { + return brw_imm_f(0.0F); + } + else if (component == SWIZZLE_ONE) { + return brw_imm_f(1.0F); + } + if (c->fp->use_const_buffer && (src->File == PROGRAM_STATE_VAR || src->File == PROGRAM_CONSTANT || |