[Mesa-dev] [PATCH 43/59] i965/fs: fix dst width calculation in CSE

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon May 2 09:01:17 UTC 2016


On Fri, Apr 29, 2016 at 01:29:40PM +0200, Samuel Iglesias Gons?lvez wrote:
> From: Connor Abbott <connor.w.abbott at intel.com>
> 
> ---
>  src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> index 15af2c1..047e4ef 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> @@ -187,7 +187,7 @@ static void
>  create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate)
>  {
>     int written = inst->regs_written;
> -   int dst_width = inst->exec_size / 8;
> +   int dst_width = DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE);

Perhaps wrap the overflowing right hand size on its own line?

>     fs_inst *copy;
>  
>     if (written > dst_width) {
> -- 
> 2.5.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list