i965/fs: use byte_offset() in offset() for uniforms
authorConnor Abbott <connor.w.abbott@intel.com>
Tue, 28 Jul 2015 23:53:53 +0000 (16:53 -0700)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:07 +0000 (11:25 +0200)
This makes things more consistent, and also fixes the offset calculation
for double uniforms.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h

index 27d9335642712e7c5cc8cd0ae99728783cc920cd..5ed123aa2265ca05a3929e2bba7e7af7a9a53fa1 100644 (file)
@@ -54,11 +54,9 @@ offset(fs_reg reg, const brw::fs_builder& bld, unsigned delta)
    case MRF:
    case VGRF:
    case ATTR:
+   case UNIFORM:
       return byte_offset(reg,
                          delta * reg.component_size(bld.dispatch_width()));
-   case UNIFORM:
-      reg.reg_offset += delta;
-      break;
    case IMM:
       assert(delta == 0);
    }