diff options
author | Brian Paul <brianp@vmware.com> | 2009-01-28 14:50:03 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-28 14:50:03 -0700 |
commit | c0d3b7679aa90e1a0dca2db152205efaec088b90 (patch) | |
tree | d3f159773a1f83e78e9b60367abbce9311420b08 /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | 9e7903e492ad842481a166484e0474dd4f3100ba (diff) | |
download | external_mesa3d-c0d3b7679aa90e1a0dca2db152205efaec088b90.zip external_mesa3d-c0d3b7679aa90e1a0dca2db152205efaec088b90.tar.gz external_mesa3d-c0d3b7679aa90e1a0dca2db152205efaec088b90.tar.bz2 |
i965: implement GL_EXT_texture_swizzle
If the texture swizzle is not XYZW (no-op) add an extra MOV instruction
after the TEX instruction to rearrange the components.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 1683308..3ee0ead 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -242,6 +242,11 @@ static void brw_wm_populate_key( struct brw_context *brw, if (img->TexFormat->MesaFormat == MESA_FORMAT_YCBCR) key->yuvtex_swap_mask |= 1 << i; } + + key->tex_swizzles[i] = t->_Swizzle; + } + else { + key->tex_swizzles[i] = SWIZZLE_NOOP; } } |