From 889e6054b7795baa789cc771e76e009d1605efae Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 24 Nov 2015 11:24:57 -0800 Subject: [PATCH] i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.30.2