wined3d: Final move of the GLSL registry check (hopefully)

Jason Green jave27 at gmail.com
Fri May 26 09:47:28 CDT 2006


Well, we've learned that not all apps perform things in the same
order, so this should hopefully be the final GLSL registry check.
This patch moves it into FillGLCaps() instead.
-------------- next part --------------
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index eff9504..f043be5 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1732,17 +1732,6 @@ #endif
         IWineD3DDevice_SetViewport((IWineD3DDevice *)This, &vp);
     }
 
-
-    /* Determine shader mode to use based on GL caps */
-    if (GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && wined3d_settings.glslRequested
-        && (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
-        wined3d_settings.shader_mode = SHADER_GLSL;
-    else if ((GL_SUPPORT(ARB_VERTEX_PROGRAM) && wined3d_settings.vs_mode == VS_HW) ||
-              (GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && wined3d_settings.ps_mode == PS_HW))
-        wined3d_settings.shader_mode = SHADER_ARB;
-    else
-        wined3d_settings.shader_mode = SHADER_SW;
-
     /* Initialize the current view state */
     This->modelview_valid = 1;
     This->proj_valid = 0;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ec9c5d7..d699d83 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -746,6 +746,17 @@ #define USE_GL_FUNC(type, pfn) gl_info->
     GLX_EXT_FUNCS_GEN;
 #undef USE_GL_FUNC
 
+    /* Determine shader mode to use based on GL caps */
+    if (gl_info->supported[ARB_SHADING_LANGUAGE_100] && wined3d_settings.glslRequested
+        && (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
+        wined3d_settings.shader_mode = SHADER_GLSL;
+    else if ((gl_info->supported[ARB_VERTEX_PROGRAM] && wined3d_settings.vs_mode == VS_HW) ||
+              (gl_info->supported[ARB_FRAGMENT_PROGRAM] && wined3d_settings.ps_mode == PS_HW))
+        wined3d_settings.shader_mode = SHADER_ARB;
+    else
+        wined3d_settings.shader_mode = SHADER_SW;
+
+
     /* If we created a dummy context, throw it away */
     if (NULL != fake_ctx) WineD3D_ReleaseFakeGLContext(fake_ctx);
 


More information about the wine-patches mailing list