summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-12 08:48:08 -0600
committerBrian Paul <[email protected]>2008-09-12 08:48:08 -0600
commite8b199c6e3386f8858adf43e5b15bf8ca0b8ce84 (patch)
treeae698c63d07ab5b04d9f9c9c0b6c9566829eaf92 /src
parent6c0fa798578ad247027dff861406a524821ddcdd (diff)
cell: implement swizzling for src regs
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_gen_fp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.c b/src/gallium/drivers/cell/ppu/cell_gen_fp.c
index 6ffe94eb14a..d7a8846ab3a 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fp.c
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.c
@@ -137,11 +137,12 @@ get_src_reg(struct codegen *gen,
const struct tgsi_full_src_register *src)
{
int reg;
+ int swizzle = tgsi_util_get_full_src_register_extswizzle(src, channel);
- /* XXX need to examine src swizzle info here.
- * That will involve changing the channel var...
- */
+ assert(swizzle >= 0);
+ assert(swizzle <= 3);
+ channel = swizzle;
switch (src->SrcRegister.File) {
case TGSI_FILE_TEMPORARY: