i965/fs: Add support for doing MOV_INDIRECT on uniforms
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 Nov 2015 02:32:38 +0000 (18:32 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 14 Dec 2015 22:28:30 +0000 (14:28 -0800)
src/mesa/drivers/dri/i965/brw_fs.cpp

index c833ef0be3bd2b7f82dd1501638ea2b6bac768cd..61b2a4ba80ed4ce400756692a0ba5022d2ca727d 100644 (file)
@@ -850,7 +850,10 @@ fs_inst::regs_read(int arg) const
          assert(src[2].file == IMM);
          unsigned region_length = src[2].ud;
 
-         if (src[0].file == FIXED_GRF) {
+         if (src[0].file == UNIFORM) {
+            assert(region_length % 4 == 0);
+            return region_length / 4;
+         } else if (src[0].file == FIXED_GRF) {
             /* If the start of the region is not register aligned, then
              * there's some portion of the register that's technically
              * unread at the beginning.