diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7f772a2..33dad77 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -969,7 +969,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } } max_constantsF = min(This->baseShader.limits.constant_float, max_constantsF); - shader_addline(buffer, "uniform vec4 %cC[%u];\n", prefix, max_constantsF); + shader_addline(buffer, "uniform vec4 %cC[%u];\n", prefix, max_constantsF - 3); } /* Always declare the full set of constants, the compiler can remove the unused ones because d3d doesn't(yet) diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index b656601..848699c 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1897,8 +1897,7 @@ HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl * } } - shader->baseShader.load_local_constsF = shader->baseShader.reg_maps.usesrelconstF - && !list_empty(&shader->baseShader.constantsF); + shader->baseShader.load_local_constsF = TRUE; return WINED3D_OK; } @@ -1996,7 +1995,7 @@ HRESULT geometryshader_init(struct wined3d_geometryshader *shader, IWineD3DDevic return hr; } - shader->base_shader.load_local_constsF = FALSE; + shader->base_shader.load_local_constsF = TRUE; return WINED3D_OK; } @@ -2314,7 +2313,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de } } - shader->baseShader.load_local_constsF = FALSE; + shader->baseShader.load_local_constsF = TRUE; return WINED3D_OK; }