diff options
author | Ilia Mirkin <[email protected]> | 2014-06-27 00:27:07 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-07-01 11:34:40 -0400 |
commit | 40b8aec25128e1f4712babddafe2d7515085d4ca (patch) | |
tree | 0ac8d094827a70ca62af3a218187f7ed1ff5afb2 /src/gallium | |
parent | 1d16dbf4160b41f1177827198a4bb32969e15809 (diff) |
nvc0/ir: fix emitting vertex stream
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp index f69e6a183e1..84c2c6b0a49 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp @@ -1507,13 +1507,14 @@ CodeEmitterNVC0::emitOUT(const Instruction *i) // vertex stream if (i->src(1).getFile() == FILE_IMMEDIATE) { - // Using immediate encoding here triggers an invalid opcode error - // or random results when error reporting is disabled. - // TODO: figure this out when we get multiple vertex streams - assert(SDATA(i->src(1)).u32 == 0); - srcId(NULL, 26); - // code[1] |= 0xc000; - // code[0] |= SDATA(i->src(1)).u32 << 26; + unsigned int stream = SDATA(i->src(1)).u32; + assert(stream < 4); + if (stream) { + code[1] |= 0xc000; + code[0] |= stream << 26; + } else { + srcId(NULL, 26); + } } else { srcId(i->src(1), 26); } |