[virglrenderer-devel] [PATCH 08/12] arb_gpu_shader5: add support for interpolation instructions

Dave Airlie airlied at gmail.com
Thu May 17 04:18:17 UTC 2018


>> > If that doesn't work, it's probably better to name it src_swizzle[0] if
>> > other instructions need that information.
>
>> GLSL interpolateAt instructions are special in they have some constraints
>
>> - they have to take an input (not a temp or other intermediate variable)
>> - the input size must match the output size, no swizzling or writemasks
>
> The spec is pretty clear about the restrictions on the input:
>
> "For all of the interpolation functions, <interpolant> must be an input
> variable or an element of an input variable declared as an array.
> Component selection operators (e.g., ".xy") may not be used when
> specifying <interpolant>."
>
> It's a little less clear on if the intermediate result can be used.  For
> example, can we do this:
>
> temp[0].xy = (interpolateAtCentroid(input_name)).xy  ??
>
> Other codes (TGSI_OPCODE_LRP) seem to swizzle the intermediate result.
>
>> So we have to do the GLSL call first (hence interp_temp), then convert
>> the result to match
>> what TGSI wants.

Ah I've dropped interp_temp locally now, seems to work okay,

Will resend that code once I've tested it a bit more.

Dave.


More information about the virglrenderer-devel mailing list