integer TGSI source modifier handling incorrect
For UADD dst, -src0, src1
, the negate should be done as integer, but virglrenderer was generating:
temp0[3].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[1].xxxx)) + uvec4(floatBitsToUint(-temp0[2].xxxx))))).x);
where the negate was being applied on the float storage value of the temporary. Check out tgsi_opcode_infer_src_type()
for a table of what the type should be on src operands.
(Found when converting to more optimized TGSI from nir_to_tgsi in mesa/mesa!8044 (merged))