[Mesa-dev] [PATCH 7/8] nvc0/ir: fix emitting vertex stream

Ilia Mirkin imirkin at alum.mit.edu
Thu Jun 26 21:40:15 PDT 2014


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 14 +++++++-------
 1 file changed, 7 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 f69e6a1..33c9d53 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,13 @@ 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;
+      if (stream) {
+         code[1] |= 0xc000;
+         code[0] |= stream << 26;
+      } else {
+         srcId(NULL, 26);
+      }
    } else {
       srcId(i->src(1), 26);
    }
-- 
1.8.5.5



More information about the mesa-dev mailing list