diff options
author | Brian <[email protected]> | 2007-10-15 10:27:12 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-15 10:27:12 -0600 |
commit | 41b3fcbf0404bc4a4f6588c0feef553bb65d4440 (patch) | |
tree | d1c7eea32e94b4a947c54d1aac8277b79dbc7c97 /src | |
parent | 29db69e222b04b5a616942b06bd118c9ac75ec41 (diff) |
check for extended swizzles, added TGSI_OPCODE_KILP
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_fpc_translate.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/mesa/pipe/i915simple/i915_fpc_translate.c b/src/mesa/pipe/i915simple/i915_fpc_translate.c index f34225bfedc..e041f891401 100644 --- a/src/mesa/pipe/i915simple/i915_fpc_translate.c +++ b/src/mesa/pipe/i915simple/i915_fpc_translate.c @@ -197,11 +197,21 @@ src_vector(struct i915_fp_compile *p, return 0; } - src = swizzle(src, - source->SrcRegister.SwizzleX, - source->SrcRegister.SwizzleY, - source->SrcRegister.SwizzleZ, - source->SrcRegister.SwizzleW); + if (source->SrcRegister.Extended) { + src = swizzle(src, + source->SrcRegisterExtSwz.ExtSwizzleX, + source->SrcRegisterExtSwz.ExtSwizzleY, + source->SrcRegisterExtSwz.ExtSwizzleZ, + source->SrcRegisterExtSwz.ExtSwizzleW); + } + else { + src = swizzle(src, + source->SrcRegister.SwizzleX, + source->SrcRegister.SwizzleY, + source->SrcRegister.SwizzleZ, + source->SrcRegister.SwizzleW); + } + /* There's both negate-all-components and per-component negation. * Try to handle both here. @@ -512,6 +522,19 @@ i915_translate_instruction(struct i915_fp_compile *p, break; case TGSI_OPCODE_KIL: + /* unconditional kill */ + assert(0); /* not tested yet */ +#if 0 + src0 = src_vector(p, &inst->FullSrcRegisters[0]); + tmp = i915_get_utemp(p); + + i915_emit_texld(p, tmp, A0_DEST_CHANNEL_ALL, /* use a dummy dest reg */ + 0, src0, T0_TEXKILL); +#endif + break; + + case TGSI_OPCODE_KILP: + /* kill if src[0].x < 0 || src[0].y < 0 ... */ src0 = src_vector(p, &inst->FullSrcRegisters[0]); tmp = i915_get_utemp(p); |