Added TGSI_FILE_OUTPUT case in fetch_src_file_channel().
authorBrian <brian.paul@tungstengraphics.com>
Tue, 2 Oct 2007 20:17:47 +0000 (14:17 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 2 Oct 2007 20:17:47 +0000 (14:17 -0600)
GLSL output variables (such as vertex varyings) can be read (they're not
write-only).

src/mesa/pipe/tgsi/exec/tgsi_exec.c

index d757df48d8d031ea1b6222f9d7274c86774507da..e428b250f007cb8d72f226be7ef9569ab2136646 100644 (file)
@@ -855,6 +855,14 @@ fetch_src_file_channel(
          chan->u[3] = mach->Addrs[index->i[3]].xyzw[swizzle].u[3];
          break;
 
+      case TGSI_FILE_OUTPUT:
+         /* vertex varying/output vars can be read too */
+         chan->u[0] = mach->Outputs[index->i[0]].xyzw[swizzle].u[0];
+         chan->u[1] = mach->Outputs[index->i[1]].xyzw[swizzle].u[1];
+         chan->u[2] = mach->Outputs[index->i[2]].xyzw[swizzle].u[2];
+         chan->u[3] = mach->Outputs[index->i[3]].xyzw[swizzle].u[3];
+         break;
+
       default:
          assert( 0 );
       }