[PATCH 1/4] wined3d: Handle fog_start == fog_end with table fog

Henri Verbeet hverbeet at gmail.com
Sun Jun 16 02:51:16 CDT 2013


On 15 June 2013 23:10, Stefan Dösinger <stefan at codeweavers.com> wrote:
> I re-tested this on Nvidia and r600g. GLSL works as expected on both
> drivers, but ARB and the fixed function GL pipeline have different
> behavior. On Nvidia, everything is fogged (like d3d vertex fog). r600g
> seems to increase one of the parameters like my patch does, with two
> differences: It adds a higher number, so there's a visible fog
> gradient, and it increases fogstart (or decreases fogend), so it
> produces the opposite of what we want.
>
> I can test other drivers, but I think it is safe to conclude that
> fogstart==fogend is not well defined in GL and we want to avoid it.
>
Well, the spec seems pretty unambiguous. In the case of Mesa, it looks
like a slightly broken optimization
(http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/program/prog_statevars.c#n452),
that could probably be fixed, especially if you also supply a piglit
testcase. I wouldn't be all that surprised if something similar was
happening on nvidia, although that one is of course harder to get
fixed.

As far as wined3d is concerned, it seems to me that the most you can
conclude is that some drivers have issues with the fixed function
implementation of this. If we care enough about pre-SM2 hardware
(because everything else will end up using GLSL) we could consider
adding a quirk for that, but it should be limited to the fixed
function / ARB program path and the affected drivers in that case.



More information about the wine-devel mailing list