[Mesa-dev] [PATCH 14/15] i965/vec4: Some more trivial swizzle clean-up.

Matt Turner mattst88 at gmail.com
Sat Mar 21 14:48:52 PDT 2015


On Fri, Mar 20, 2015 at 7:11 AM, Francisco Jerez <currojerez at riseup.net> wrote:
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index a6842fc..8e4df8c 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -572,12 +572,8 @@ vec4_visitor::pack_uniform_registers()
>             continue;
>
>          inst->src[i].reg = new_loc[src];
> -
> -        int sx = BRW_GET_SWZ(inst->src[i].swizzle, 0) + new_chan[src];
> -        int sy = BRW_GET_SWZ(inst->src[i].swizzle, 1) + new_chan[src];
> -        int sz = BRW_GET_SWZ(inst->src[i].swizzle, 2) + new_chan[src];
> -        int sw = BRW_GET_SWZ(inst->src[i].swizzle, 3) + new_chan[src];
> -        inst->src[i].swizzle = BRW_SWIZZLE4(sx, sy, sz, sw);
> +        inst->src[i].swizzle += BRW_SWIZZLE4(new_chan[src], new_chan[src],

Tab here.

> +                                              new_chan[src], new_chan[src]);
>        }
>     }
>  }


More information about the mesa-dev mailing list