Commit b5a252bc authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d/glsl: Always set WINED3D_SHADER_CONST_FFP_LIGHTS in FFP constant update masks.

It is possible (if somewhat artificial) to use lighting without using ambient lighting. In this case ffp_light_ambient may not be an active uniform. We could be more sophisticated here, and add lighting to the mask if we use any lighting uniform, but this is simpler and probably good enough.
parent 4171fdf4
......@@ -12325,13 +12325,13 @@ static void test_specular_shaders(void)
ok(hr == S_OK, "Got hr %#lx.\n", hr);
get_surface_readback(context.backbuffer, &rb);
color = get_readback_color(&rb, 160, 120);
todo_wine ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 480, 120);
todo_wine ok(color_match(color, 0x001900, 1), "Got color %08x.\n", color);
ok(color_match(color, 0x001900, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 160, 360);
todo_wine ok(color_match(color, 0x009900, 1), "Got color %08x.\n", color);
ok(color_match(color, 0x009900, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 480, 360);
todo_wine ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
release_surface_readback(&rb);
hr = IDirect3DDevice8_BeginScene(device);
......
......@@ -10595,7 +10595,7 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
else
{
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW
| WINED3D_SHADER_CONST_FFP_PROJ;
| WINED3D_SHADER_CONST_FFP_PROJ | WINED3D_SHADER_CONST_FFP_LIGHTS;
for (i = 1; i < MAX_VERTEX_BLENDS; ++i)
{
......@@ -10619,8 +10619,6 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
|| entry->vs.material_emissive_location != -1
|| entry->vs.material_shininess_location != -1)
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MATERIAL;
if (entry->vs.light_ambient_location != -1)
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_LIGHTS;
}
if (entry->vs.clip_planes_location != -1)
entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_CLIP_PLANES;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment