[18/23] wined3d: Add support for flat interpolation in shaders.

Józef Kucia joseph.kucia at gmail.com
Sun Nov 13 17:08:43 CST 2016


On Sun, Nov 13, 2016 at 11:44 PM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> 2016-11-13 12:35 GMT-06:00 Andrew Wesie <awesie at gmail.com>:
>> Signed-off-by: Andrew Wesie <awesie at gmail.com>
>
> It looks like you're never declaring shader outputs as flat. Is the
> potential mismatch with the shader input declarations a problem?

Yes, this is a problem for older OpenGL versions. However, it's
allowed in newer OpenGL versions. AFAIK it was changed in GLSL 4.3 but
in practice you can use it only in GLSL 4.4 or higher because the spec
was inconsistent, and some drivers still report input/output mismatch
errors in GLSL 4.3.

> BTW, I find it a bit surprising that flat varyings are actually used
> in SM4+ applications, AFAIK there is no way to mark inputs / outputs
> as flat in HLSL, which would suggest some kind of manual tinkering
> with the shader bytecode is required to use them.

There is the "nointerpolation" HLSL keyword. Note that manual
tinkering with a shader bytecode would be only possible if you would
know the checksum algorithm used in shader bytecodes.



More information about the wine-devel mailing list