On 18 June 2013 16:17, Stefan Dösinger stefan@codeweavers.com wrote:
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e14d7ab..ad9be6a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7107,7 +7109,7 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, new_source = FOGSOURCE_FFP; }
- if (new_source != context->fog_source)
- if (new_source != context->fog_source || fogstart == fogend) { context->fog_source = new_source; state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART));
You shouldn't need this.
Am 18.06.2013 um 16:33 schrieb Henri Verbeet:
On 18 June 2013 16:17, Stefan Dösinger stefan@codeweavers.com wrote:
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e14d7ab..ad9be6a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7107,7 +7109,7 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, new_source = FOGSOURCE_FFP; }
- if (new_source != context->fog_source)
- if (new_source != context->fog_source || fogstart == fogend) { context->fog_source = new_source; state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART));
You shouldn't need this.
It's needed to switch between the different handling of fogstart and fogend in vertex and table fog. The ddraw test shows this. The d3d8 and d3d9 tests succeed without it because they're also switching vertex and pixel shaders when the test switches between vertex and table fog.
On 18 June 2013 16:52, Stefan Dösinger stefan@codeweavers.com wrote:
It's needed to switch between the different handling of fogstart and fogend in vertex and table fog. The ddraw test shows this. The d3d8 and d3d9 tests succeed without it because they're also switching vertex and pixel shaders when the test switches between vertex and table fog.
Right. Perhaps FOGSOURCE_FFP should be split up.
Am 18.06.2013 um 17:25 schrieb Henri Verbeet:
On 18 June 2013 16:52, Stefan Dösinger stefan@codeweavers.com wrote:
It's needed to switch between the different handling of fogstart and fogend in vertex and table fog. The ddraw test shows this. The d3d8 and d3d9 tests succeed without it because they're also switching vertex and pixel shaders when the test switches between vertex and table fog.
Right. Perhaps FOGSOURCE_FFP should be split up.
I was thinking about that, but didn't consider it worth the trouble from a performance and code-niceness point of view.