diff options
author | Christoph Bumiller <[email protected]> | 2009-09-25 10:53:01 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2009-09-25 11:01:45 +0200 |
commit | 5f4f7ad965c40327f16297606ed4f425598bfc2c (patch) | |
tree | c8f9b6e06cdaf2a642a17980fdf01c15510a95c9 /src/gallium/drivers | |
parent | 513cadf5afad18516f7299ade246f59d520753d0 (diff) |
nv50: fix TEX for WriteMask not equal 0xf
If you e.g. only need alpha, it ends up in the first reg,
not the last, as it would when reading rgb too.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 272fd8d90ba..576d075318f 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -1166,10 +1166,11 @@ emit_tex(struct nv50_pc *pc, struct nv50_reg **dst, unsigned mask, emit(pc, e); #if 1 - if (mask & 1) emit_mov(pc, dst[0], t[0]); - if (mask & 2) emit_mov(pc, dst[1], t[1]); - if (mask & 4) emit_mov(pc, dst[2], t[2]); - if (mask & 8) emit_mov(pc, dst[3], t[3]); + c = 0; + if (mask & 1) emit_mov(pc, dst[0], t[c++]); + if (mask & 2) emit_mov(pc, dst[1], t[c++]); + if (mask & 4) emit_mov(pc, dst[2], t[c++]); + if (mask & 8) emit_mov(pc, dst[3], t[c]); free_temp4(pc, t); #else |