Phil Costin : wined3d: Shader caps fix - code relocation.

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 25 14:18:22 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 163ee765920d80cbb32e31f1ade976b5c45c5722
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=163ee765920d80cbb32e31f1ade976b5c45c5722

Author: Phil Costin <philcostin at hotmail.com>
Date:   Thu May 25 13:31:14 2006 +0100

wined3d: Shader caps fix - code relocation.

---

 dlls/wined3d/directx.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index c27e75c..0bb5589 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1696,6 +1696,16 @@ #endif
     *pCaps->MaxStreams          = MAX_STREAMS;
     *pCaps->MaxStreamStride     = 1024;
 
+    /* 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;
+
     if (wined3d_settings.vs_mode == VS_HW && wined3d_settings.shader_mode == SHADER_GLSL
          && DeviceType != WINED3DDEVTYPE_REF) {
         *pCaps->VertexShaderVersion = D3DVS_VERSION(3,0);
@@ -1846,16 +1856,6 @@ HRESULT  WINAPI  IWineD3DImpl_CreateDevi
     IWineD3DImpl_FillGLCaps(&This->gl_info, IWineD3DImpl_GetAdapterDisplay(iface, Adapter));
     LEAVE_GL();
 
-    /* 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;
-
     /* set the state of the device to valid */
     object->state = WINED3D_OK;
 




More information about the wine-cvs mailing list