On Mon, Jul 17, 2017 at 8:30 PM, Thomas Berger loki@lokis-chaos.de wrote:
On Montag, 17. Juli 2017 16:26:18 CEST Henri Verbeet wrote:
Quite frankly, I think those bug reports are questionable to begin with. The level of analysis seems to be "I saw a FIXME", without any reasoning how that's related to any negative effect in the application.
There are some bugs, blocked by the missing opcodes right now. It also sound reasonable that, if the interpolation for shaders is not working as expected, it results in graphical artifacts.
For a lot of games implementing those opcodes won't make any, noticeable or significant difference, but yes, it may fix some graphics artifacts for other games.
There are many other bugs, much more critical with more effect, yes. But: The wine source is something new to me. Implementing this two opcodes is a task where i know what the opcodes should do, and how to do that. As there is a very straight forward translation to GLSL, it is not much afford to write high performance translation functions. So, that's the reason why i decided to pick these two bugs.
If we want to implement this we potentially need two code paths: * in GLSL 4.40+ you can just specify interpolation qualifiers in a fragment shaders (i.e. interpolation qualifiers don't have too much between shader stages), * in older GLSL versions the implementation will be more involved, you have to specify matching interpolation qualifiers in a fragment shader and a previous shader stage. It's a bit problematic because you will need to generate a shader variant for a previous shader stage depending on interpolation qualifiers in a fragment shader.
I think we should implement the code path for older GLSL versions first, so we do not require GLSL 4.40+ for SM4 shader support. The GLSL 4.40+ code path is a nice addition because it doesn't need shader variants.
FWIW, there were some patches submitted for interpolation qualifiers in the past [1], [2]. You can potentially use them as a starting point. The mentioned patches contain a simple test case for interpolation qualifiers. You can also find some review comments on wine-devel [3], [4].
[1] - https://www.winehq.org/pipermail/wine-patches/2016-November/155649.html [2] - https://www.winehq.org/pipermail/wine-patches/2016-November/155843.html [3] - https://www.winehq.org/pipermail/wine-devel/2016-November/115234.html [4] - https://www.winehq.org/pipermail/wine-devel/2016-November/115338.html