[PATCH] Default to GLSL. This is safe because we now have proper ps2.0/vs2.0 detection.
Roderick Colenbrander
thunderbird2k at gmx.net
Sat Oct 27 17:28:53 CDT 2007
---
dlls/wined3d/directx.c | 8 +++++++-
dlls/wined3d/wined3d_main.c | 10 +++-------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 47bf9e1..6407f60 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -335,7 +335,13 @@ static void select_shader_mode(
if (wined3d_settings.vs_mode == VS_NONE) {
*vs_selected = SHADER_NONE;
} else if (gl_info->supported[ARB_VERTEX_SHADER] && wined3d_settings.glslRequested) {
- *vs_selected = SHADER_GLSL;
+ /* Geforce4 cards support GLSL but for vertex shaders only. Further its reported GLSL caps are
+ * wrong. This combined with the fact that glsl won't offer more features or performance, use ARB
+ * shaders only on this card. */
+ if(gl_info->vs_nv_version < VS_VERSION_20)
+ *vs_selected = SHADER_ARB;
+ else
+ *vs_selected = SHADER_GLSL;
} else if (gl_info->supported[ARB_VERTEX_PROGRAM]) {
*vs_selected = SHADER_ARB;
} else {
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index ebe09bd..26e7f70 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -39,7 +39,7 @@ wined3d_settings_t wined3d_settings =
VS_HW, /* Hardware by default */
PS_HW, /* Hardware by default */
VBO_HW, /* Hardware by default */
- FALSE, /* Use of GLSL disabled by default */
+ TRUE, /* Use of GLSL enabled by default */
ORM_BACKBUFFER, /* Use the backbuffer to do offscreen rendering */
RTL_AUTO, /* Automatically determine best locking method */
0, /* The default of memory is set in FillGLCaps */
@@ -184,14 +184,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
}
if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
{
- if (!strcmp(buffer,"enabled"))
- {
- TRACE("Use of GL Shading Language enabled for systems that support it\n");
- wined3d_settings.glslRequested = TRUE;
- }
- else
+ if (!strcmp(buffer,"disabled"))
{
TRACE("Use of GL Shading Language disabled\n");
+ wined3d_settings.glslRequested = FALSE;
}
}
if ( !get_config_key( hkey, appkey, "OffscreenRenderingMode", buffer, size) )
--
1.5.1.3
--========GMX103231193524696429242--
More information about the wine-patches
mailing list