[Mesa-dev] [PATCH 03/11] st/mesa: implement GL_ATI_fragment_shader
Ilia Mirkin
imirkin at alum.mit.edu
Wed Dec 16 14:36:34 PST 2015
On Wed, Dec 16, 2015 at 5:28 PM, Miklós Máté <mtmkls at gmail.com> wrote:
>>> + if (srcReg->argMod & GL_NEGATE_BIT_ATI) {
>>> + struct ureg_src modsrc[2];
>>> + modsrc[0] = ureg_src(arg);
>>> + modsrc[1] = ureg_imm1f(t->ureg, -1.0);
>>> +
>>> + emit_insn(t, TGSI_OPCODE_MUL, &arg, 1, modsrc, 2);
>>
>> aka NEG arg, arg
>
> I'd love to, but there is no such TGSI opcode.
Gah! There's an INEG, that's like the same thing ;) Seriously though,
there's actually a NEG modifier as well that you can use --
ureg_negate(src), which you can use with a plain MOV (or any other
op).
-ilia
More information about the mesa-dev
mailing list