[Mesa-dev] [PATCH 23/24] i965/vec4: Replace src_reg(imm) constructors with brw_imm_*().

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 3 08:09:28 PST 2015


On 3 November 2015 at 00:29, Matt Turner <mattst88 at gmail.com> wrote:

> @@ -387,7 +342,9 @@ vec4_visitor::opt_vector_float()
>
>        remaining_channels &= ~inst->dst.writemask;
>        if (remaining_channels == 0) {
> -         vec4_instruction *mov = MOV(inst->dst, imm);
> +         unsigned vf;
> +         memcpy(&vf, imm, sizeof(vf));
> +         vec4_instruction *mov = MOV(inst->dst, brw_imm_vf(vf));
You can drop the temp variable + memcpy call and use brw_imm_vf4(imm[x],....)

-Emil


More information about the mesa-dev mailing list