[PATCH 4/8] wined3d: Drop WINED3D_RS_TEXTUREPERSPECTIVE handling.

Matteo Bruni mbruni at codeweavers.com
Tue Jun 16 15:45:40 CDT 2015


The hint is not supported on core profiles. It's not guaranteed to do
anything on compatibility profile either: "The interpretation of hints is
implementation dependent. An implementation may ignore them entirely."

This state was only available on D3D 7 and below (and not guaranteed to
do anything there either, according to older DX SDK docs).
If necessary we could implement it via the GLSL 1.50 "noperspective"
interpolation qualifier, which is what we need to use for the equivalent
D3D10 feature anyway.
---
 dlls/wined3d/state.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 67558fd..f5a9a24 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1698,22 +1698,6 @@ static void state_zvisible(struct wined3d_context *context, const struct wined3d
         FIXME("WINED3D_RS_ZVISIBLE not implemented.\n");
 }
 
-static void state_perspective(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
-{
-    const struct wined3d_gl_info *gl_info = context->gl_info;
-
-    if (state->render_states[WINED3D_RS_TEXTUREPERSPECTIVE])
-    {
-        gl_info->gl_ops.gl.p_glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-        checkGLcall("glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)");
-    }
-    else
-    {
-        gl_info->gl_ops.gl.p_glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
-        checkGLcall("glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST)");
-    }
-}
-
 static void state_stippledalpha(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
 {
     if (state->render_states[WINED3D_RS_STIPPLEDALPHA])
@@ -4939,7 +4923,7 @@ const struct StateEntryTemplate misc_state_template[] =
     { STATE_INDEXBUFFER,                                  { STATE_INDEXBUFFER,                                  indexbuffer         }, ARB_VERTEX_BUFFER_OBJECT        },
     { STATE_INDEXBUFFER,                                  { STATE_INDEXBUFFER,                                  state_nop           }, WINED3D_GL_EXT_NONE             },
     { STATE_RENDER(WINED3D_RS_ANTIALIAS),                 { STATE_RENDER(WINED3D_RS_ANTIALIAS),                 state_antialias     }, WINED3D_GL_EXT_NONE             },
-    { STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE),        { STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE),        state_perspective   }, WINED3D_GL_EXT_NONE             },
+    { STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE),        { STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE),        state_nop           }, WINED3D_GL_EXT_NONE             },
     { STATE_RENDER(WINED3D_RS_ZENABLE),                   { STATE_RENDER(WINED3D_RS_ZENABLE),                   state_zenable       }, WINED3D_GL_EXT_NONE             },
     { STATE_RENDER(WINED3D_RS_WRAPU),                     { STATE_RENDER(WINED3D_RS_WRAPU),                     state_wrapu         }, WINED3D_GL_EXT_NONE             },
     { STATE_RENDER(WINED3D_RS_WRAPV),                     { STATE_RENDER(WINED3D_RS_WRAPV),                     state_wrapv         }, WINED3D_GL_EXT_NONE             },
-- 
2.3.6




More information about the wine-patches mailing list