[Mesa-dev] [PATCH 1/5] glsl: Allow vector logic ops to be generated.

Matt Turner mattst88 at gmail.com
Mon Mar 23 16:07:04 PDT 2015


On Wed, Mar 18, 2015 at 6:30 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> So in GLSL, add and mul can take a combination of a scalar and a
> vector, and it'll splat the scalar automatically, and with this this
> series that means that and/or can now take a combination of a scalar
> and a vector as well, and we'll have to splat them as well. Are you
> sure that the various backends will handle this gracefully?

That's a good question. I did have to fix up i965/fs.

GLSL to TGSI looks like it's fine; it just emits TGSI_OPCODE_AND or
TGSI_OPCODE_MUL for ir_binop_logic_and. IR to Mesa looks fine too; it
just emits OPCODE_MUL.

i965's vec4 backend also looks fine.

I'll send a patch for glsl to nir.


More information about the mesa-dev mailing list