This patch caused regresion in Half-Life 2 Episode One, if i have "UseGLSL"="enabled" HalfLife 2 Episode One crash about 20 seconds after start and menu page is completly white! Only the second part (second gl_max /= 4;) is the bad one, with first part evrything works well.
Mirek
H. Verbeet napsal(a):
GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB and GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB return the number of available uniform components. A 4-component float vector need 4 uniform components.
Changelog:
- Report the correct number of available 4-component float vectors for
GLSL
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);
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);
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) {
On 03/10/06, Mirek thunder.m@czela.net wrote:
This patch caused regresion in Half-Life 2 Episode One, if i have "UseGLSL"="enabled" HalfLife 2 Episode One crash about 20 seconds after start and menu page is completly white! Only the second part (second gl_max /= 4;) is the bad one, with first part evrything works well.
Mirek
Yes, we found that out today on IRC as well. The unfortunate part is that it appears this is in fact a driver bug in older nVidia drivers, which that code apparently relied upon. Reverting the patch would make the old drivers work again, but would break the newer (correct) drivers.
On Tuesday 03 October 2006 23:48, H. Verbeet wrote:
On 03/10/06, Mirek thunder.m@czela.net wrote:
This patch caused regresion in Half-Life 2 Episode One, if i have "UseGLSL"="enabled" HalfLife 2 Episode One crash about 20 seconds after start and menu page is completly white! Only the second part (second gl_max /= 4;) is the bad one, with first part evrything works well.
Mirek
Yes, we found that out today on IRC as well. The unfortunate part is that it appears this is in fact a driver bug in older nVidia drivers, which that code apparently relied upon. Reverting the patch would make the old drivers work again, but would break the newer (correct) drivers.
As "make sure to install the latest version of the driver" is one of the first steps in error fixing in win32, I guess that makes the patch still valid. :)
Cheers, Kai
This bug is in latest STABLE nVidia Linux driver, there is only one nVidia Linux driver that is working correctly (thanks for help i tried it and it is working perfect) the nVidia BETA Linux driver which is going to be stable after one or more months! So ther should be something to fix this on "old" nVidia drivers.
Mirek
Kai Blin napsal(a):
On Tuesday 03 October 2006 23:48, H. Verbeet wrote:
On 03/10/06, Mirek thunder.m@czela.net wrote:
This patch caused regresion in Half-Life 2 Episode One, if i have "UseGLSL"="enabled" HalfLife 2 Episode One crash about 20 seconds after start and menu page is completly white! Only the second part (second gl_max /= 4;) is the bad one, with first part evrything works well.
Mirek
Yes, we found that out today on IRC as well. The unfortunate part is that it appears this is in fact a driver bug in older nVidia drivers, which that code apparently relied upon. Reverting the patch would make the old drivers work again, but would break the newer (correct) drivers.
As "make sure to install the latest version of the driver" is one of the first steps in error fixing in win32, I guess that makes the patch still valid. :)
Cheers, Kai
On 04/10/06, Kai Blin kai.blin@gmail.com wrote:
As "make sure to install the latest version of the driver" is one of the first steps in error fixing in win32, I guess that makes the patch still valid. :)
Cheers, Kai
Well, the patch *is* valid (eg. ATI appears to report the correct number as well), but it still breaks stuff :-) The problem is that the 96.25 drivers are still beta drivers at the moment, so I don't think it's reasonable to ask people to upgrade to that. On the other hand... we don't currently enable GLSL by default, and one of the considerations is that there are a few known driver bugs.
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
H. Verbeet napsal(a):
On 04/10/06, Kai Blin kai.blin@gmail.com wrote:
As "make sure to install the latest version of the driver" is one of the first steps in error fixing in win32, I guess that makes the patch still valid. :)
Cheers, Kai
Well, the patch *is* valid (eg. ATI appears to report the correct number as well), but it still breaks stuff :-) The problem is that the 96.25 drivers are still beta drivers at the moment, so I don't think it's reasonable to ask people to upgrade to that. On the other hand... we don't currently enable GLSL by default, and one of the considerations is that there are a few known driver bugs.
On 04/10/06, Mirek thunder.m@czela.net 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.
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 thunder.m@czela.net 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) {
Sorry, there should be only greater then, not equal. So this i the right version :)
Mirek
Mirek napsal(a):
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 thunder.m@czela.net 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) {
---
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) {
On 04/10/06, Mirek thunder.m@czela.net wrote:
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.
There might be. GF4 might be a card we want to check. I do think it's a bit dodgy though... you'll probably want to ask Alexandre what he would consider acceptable.
OK, and now what about this patch? With this patch evrything is working correctly if i am using nVidia BETA 9625 drivers (HL2 EO, GTA SA, 3DMark 2003), corectly means same like with old driver and wine 0.9.22.
Mirek
H. Verbeet napsal(a):
On 04/10/06, Mirek thunder.m@czela.net wrote:
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.
There might be. GF4 might be a card we want to check. I do think it's a bit dodgy though... you'll probably want to ask Alexandre what he would consider acceptable.
--- directx.c.old 2006-10-03 22:36:25.000000000 +0200 +++ directx.c 2006-10-04 14:24:18.000000000 +0200 @@ -557,6 +558,7 @@ gl_info->supported[ARB_MULTISAMPLE] = TRUE; } else if (strcmp(ThisExtn, "GL_ARB_multitexture") == 0) { glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max); + gl_max *= 2; TRACE_(d3d_caps)(" FOUND: ARB Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=%u\n", gl_max); gl_info->supported[ARB_MULTITEXTURE] = TRUE; gl_info->max_textures = min(MAX_TEXTURES, gl_max);
On 04/10/06, Mirek thunder.m@czela.net wrote:
--- directx.c.old 2006-10-03 22:36:25.000000000 +0200 +++ directx.c 2006-10-04 14:24:18.000000000 +0200 @@ -557,6 +558,7 @@ gl_info->supported[ARB_MULTISAMPLE] = TRUE; } else if (strcmp(ThisExtn, "GL_ARB_multitexture") == 0) { glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_max *= 2; TRACE_(d3d_caps)(" FOUND: ARB Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=%u\n", gl_max); gl_info->supported[ARB_MULTITEXTURE] = TRUE; gl_info->max_textures = min(MAX_TEXTURES, gl_max);
That doesn't look quite correct. What is the actual problem / could you attach a +d3d_caps log (Just the part where it does extension detection)?
Here is the log, without this patch i have with new nVidia driver only 4 GL_MAX_TEXTURE_UNITS_ARB and some apps have big regression. I realy dont know why, i am not expert in wine or directx, but now it is working.
trace:d3d_caps:IWineD3DImpl_FillGLCaps GL_Extensions reported: trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_color_buffer_float trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_depth_texture trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_draw_buffers trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB_draw_buffers support - max buffers=4 trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_fragment_program trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Shader support - version=11 trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Shader support - GL_MAX_TEXTURE_IMAGE_UNITS_ARB=16 trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Shader support - max float constants=256 trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Shader support - max temporaries=32 trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Shader support - max instructions=4096 trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_fragment_program_shadow trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_fragment_shader trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB_fragment_shader (GLSL) support - max float ps constants=128 trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_half_float_pixel trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Half-float pixel support trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_imaging trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB imaging support trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_multisample trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Multisample support trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_multitexture trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=8 trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_occlusion_query trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Occlusion Query support trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_pixel_buffer_object trace:d3d_caps:IWineD3DImpl_FillGLCaps FOUND: ARB Pixel Buffer support trace:d3d_caps:IWineD3DImpl_FillGLCaps - GL_ARB_point_parameters
Mirek
H. Verbeet napsal(a):
On 04/10/06, Mirek thunder.m@czela.net wrote:
--- directx.c.old 2006-10-03 22:36:25.000000000 +0200 +++ directx.c 2006-10-04 14:24:18.000000000 +0200 @@ -557,6 +558,7 @@ gl_info->supported[ARB_MULTISAMPLE] = TRUE; } else if (strcmp(ThisExtn, "GL_ARB_multitexture") == 0) { glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_max *= 2; TRACE_(d3d_caps)(" FOUND: ARB Multitexture support -
GL_MAX_TEXTURE_UNITS_ARB=%u\n", gl_max); gl_info->supported[ARB_MULTITEXTURE] = TRUE; gl_info->max_textures = min(MAX_TEXTURES, gl_max);
That doesn't look quite correct. What is the actual problem / could you attach a +d3d_caps log (Just the part where it does extension detection)?
On 04/10/06, Mirek thunder.m@czela.net wrote:
Here is the log, without this patch i have with new nVidia driver only 4 GL_MAX_TEXTURE_UNITS_ARB and some apps have big regression. I realy dont know why, i am not expert in wine or directx, but now it is working.
The old drivers only had 4 GL_MAX_TEXTURE_UNITS_ARB as well. Also, that's not the entire extension detection log.
So this is very strange, because under Windows XP i have definitely 8. Ok, from what app do you want this log?
Mirek
H. Verbeet napsal(a):
On 04/10/06, Mirek thunder.m@czela.net wrote:
Here is the log, without this patch i have with new nVidia driver only 4 GL_MAX_TEXTURE_UNITS_ARB and some apps have big regression. I realy dont know why, i am not expert in wine or directx, but now it is working.
The old drivers only had 4 GL_MAX_TEXTURE_UNITS_ARB as well. Also, that's not the entire extension detection log.
On 04/10/06, Mirek thunder.m@czela.net wrote:
So this is very strange, because under Windows XP i have definitely 8. Ok, from what app do you want this log?
Mirek
App shouldn't matter, the +d3d_caps log should be the same. But I'll need the entire extension detection part, ie from the part where it says "Filling vendor string NVIDIA Corporation" all the way down to "GLX Extension reported:". Also, I tried 3DMark03 with the new drivers and git HEAD, and didn't notice anything strange. GL_MAX_TEXTURE_UNITS_ARB (still) returns 4 for me as well.
Sorry, my mistake, now i recompile wine and it is still doing same thing like with GL_MAX_TEXTURE_UNITS_ARB 8. I realy dont know where is the problem. Here is screenshot from GTA SA with latest cvs wine and latest nVidia driver.
Mirek
H. Verbeet napsal(a):
On 04/10/06, Mirek thunder.m@czela.net wrote:
Here is the log, without this patch i have with new nVidia driver only 4 GL_MAX_TEXTURE_UNITS_ARB and some apps have big regression. I realy dont know why, i am not expert in wine or directx, but now it is working.
The old drivers only had 4 GL_MAX_TEXTURE_UNITS_ARB as well. Also, that's not the entire extension detection log.