2016-11-13 12:35 GMT-06:00 Andrew Wesie awesie@gmail.com:
Signed-off-by: Andrew Wesie awesie@gmail.com
It looks like you're never declaring shader outputs as flat. Is the potential mismatch with the shader input declarations a problem?
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.
On Sun, Nov 13, 2016 at 11:44 PM, Matteo Bruni matteo.mystral@gmail.com wrote:
2016-11-13 12:35 GMT-06:00 Andrew Wesie awesie@gmail.com:
Signed-off-by: Andrew Wesie awesie@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.
On 14 November 2016 at 00:08, Józef Kucia joseph.kucia@gmail.com wrote:
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.
That algorithm is actually somewhat known these days, it seems to be a variant of MD5.