And what about this patch? It is working with new and old nVidia drivers, but i dont know if some cards have gl_max realy 256 and below.

Mirek

H. Verbeet napsal(a):
On 04/10/06, Mirek <[EMAIL PROTECTED]> wrote:

Unfortunately there are many issues with latest nVidia drivers and
Windows apps in wine. In Half-Life 2 EO (characters brokes the game),
3DMark 2003 (first test with planes is very strange), GTA SA (almost
everywhere in game), but other apps such as Flatout 2, Tomb Raider
Legend, Need for Speed Most Wanted, 3DMark 2005 and 2006 working like
with stable driver.

I am using Nvidia GF 6800 GS PCI-E with Core 2 Extreme and GLSL
functions no ARB.

Mirek

It's possible those are actual bugs in our GLSL. The 96.25 drivers'
GLSL compiler seems to be quite a bit stricter than previous versions.

As for the constants issue, I see a few options, none of which I
particularly like:
 - Keep it the way it currently is. Correct, but breaks the current
stable drivers
 - Revert the patch. The code will be incorrect, and break with 96.25
and later drivers. The current stable drivers will work though.
 - Add a version check. Quite ugly, but should work with both sets of
drivers. Good luck convincing Alexandre on that one :-)

Personally I'm leaning towards the first option, in part because
driver bugs are one of the reasons GLSL isn't enabled by default at
the moment, in part because the code is simply correct.



---

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

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index fdde6ea..0e61c67 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -546,6 +546,7 @@ #undef USE_GL_FUNC
             } else if (strcmp(ThisExtn, "GL_ARB_fragment_shader") == 0) {
                 gl_info->supported[ARB_FRAGMENT_SHADER] = TRUE;
                 glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, &gl_max);
+                if ( gl_max >= 256 )
+                    gl_max /= 4;
                 TRACE_(d3d_caps)(" FOUND: ARB_fragment_shader (GLSL) support - 
max float ps constants=%u\n", gl_max);
                 gl_info->ps_glsl_constantsF = gl_max;
             } else if (strcmp(ThisExtn, "GL_ARB_imaging") == 0) {
@@ -618,6 +619,7 @@ #undef USE_GL_FUNC
             } else if (strcmp(ThisExtn, "GL_ARB_vertex_shader") == 0) {
                 gl_info->supported[ARB_VERTEX_SHADER] = TRUE;
                 glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &gl_max);
+                if ( gl_max >= 256 )
+                    gl_max /= 4;
                 TRACE_(d3d_caps)(" FOUND: ARB_vertex_shader (GLSL) support - 
max float vs constants=%u\n", gl_max);
                 gl_info->vs_glsl_constantsF = gl_max;
             } else if (strcmp(ThisExtn, "GL_ARB_vertex_blend") == 0) {


Reply via email to