From: Connor Abbott Date: Tue, 28 Jul 2015 23:53:53 +0000 (-0700) Subject: i965/fs: use byte_offset() in offset() for uniforms X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc64c9e441acce45b1a7531d1762d152ad9ce22f;p=mesa.git i965/fs: use byte_offset() in offset() for uniforms This makes things more consistent, and also fixes the offset calculation for double uniforms. Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 27d93356427..5ed123aa226 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -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); }