wined3d: Report the correct number of available 4-component float vectors for GLSL

Mirek thunder.m at czela.net
Tue Oct 3 16:25:34 CDT 2006


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) {
> 
> 
> ------------------------------------------------------------------------
> 
> 



More information about the wine-devel mailing list