nv50/ir: disallow shader input + cbuf in same instruction in gp
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 11 Jan 2014 03:17:04 +0000 (22:17 -0500)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 27 Jan 2014 15:40:42 +0000 (16:40 +0100)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp

index c27d4532e5aa0c8527e1e35a82a966a811599399..ecf5d1c70a2010b56a831ddaf4849294765d3ebb 100644 (file)
@@ -300,11 +300,16 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
    case 0x01:
    case 0x03:
    case 0x08:
-   case 0x09:
    case 0x0c:
    case 0x20:
    case 0x21:
       break;
+   case 0x09:
+      // Shader inputs get transformed to p[] in geometry shaders, and those
+      // aren't allowed to be used at the same time as c[].
+      if (ld->bb->getProgram()->getType() == Program::TYPE_GEOMETRY)
+         return false;
+      break;
    case 0x0d:
       if (ld->bb->getProgram()->getType() != Program::TYPE_GEOMETRY)
          return false;