nv50/ir: we can't load local memory directly into an output
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 2 Apr 2016 21:46:58 +0000 (17:46 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 2 Apr 2016 22:10:20 +0000 (18:10 -0400)
This fixes piglit tests like

tests/spec/glsl-1.10/execution/variable-indexing/vs-output-array-float-index-wr.shader_test

and related ones.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp

index 02c4f1a4ca89f1821c5d55bd1169b71fa4c13417..36ab837f6e2592bc4ae6613930eaacf93d73b1bf 100644 (file)
@@ -372,7 +372,8 @@ NV50LegalizeSSA::propagateWriteToOutput(Instruction *st)
       return;
 
    for (int s = 0; di->srcExists(s); ++s)
-      if (di->src(s).getFile() == FILE_IMMEDIATE)
+      if (di->src(s).getFile() == FILE_IMMEDIATE ||
+          di->src(s).getFile() == FILE_MEMORY_LOCAL)
          return;
 
    if (prog->getType() == Program::TYPE_GEOMETRY) {