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>
Thu, 14 Apr 2016 22:59:33 +0000 (15:59 -0700)
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 944ad4d8a98dcf270c825b3cccdb6ded6d2e6553..8802540f5f03e821e533a6d320834b07781d7ddb 100644 (file)
@@ -853,7 +853,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.