From: Jason Ekstrand Date: Tue, 24 Nov 2015 19:24:57 +0000 (-0800) Subject: i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=889e6054b7795baa789cc771e76e009d1605efae;p=mesa.git i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr The subnr field is in bytes so we don't need to multiply by type_sz. Reviewed-by: Kristian Høgsberg Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 8802540f5f0..24482096f17 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -870,7 +870,7 @@ fs_inst::regs_read(int arg) const * unread portion at the beginning. */ if (src[0].subnr) - region_length += src[0].subnr * type_sz(src[0].type); + region_length += src[0].subnr; return DIV_ROUND_UP(region_length, REG_SIZE); } else {