Module: wine Branch: master Commit: 8e403b721a35eec587a3527b0362f0f4add638eb URL: https://gitlab.winehq.org/wine/wine/-/commit/8e403b721a35eec587a3527b0362f0f...
Author: Elizabeth Figura zfigura@codeweavers.com Date: Sun Jun 9 12:50:25 2024 -0500
wined3d: Reorder light application in wined3d_device_apply_stateblock().
---
dlls/wined3d/stateblock.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 7b09b874137..11276ffd419 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -2749,19 +2749,6 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, wined3d_device_set_ps_consts_b(device, range.offset, range.size, &state->ps_consts_b[range.offset]); }
- if (changed->lights) - { - struct wined3d_light_info *light, *cursor; - - LIST_FOR_EACH_ENTRY_SAFE(light, cursor, &changed->changed_lights, struct wined3d_light_info, changed_entry) - { - wined3d_device_context_set_light(context, light->OriginalIndex, &light->OriginalParms); - wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1); - list_remove(&light->changed_entry); - light->changed = false; - } - } - for (i = 0; i < ARRAY_SIZE(changed->renderState); ++i) { map = changed->renderState[i]; @@ -3337,6 +3324,19 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, wined3d_device_set_clip_plane(device, i, &state->clip_planes[i]); }
+ if (changed->lights) + { + struct wined3d_light_info *light, *cursor; + + LIST_FOR_EACH_ENTRY_SAFE(light, cursor, &changed->changed_lights, struct wined3d_light_info, changed_entry) + { + wined3d_device_context_set_light(context, light->OriginalIndex, &light->OriginalParms); + wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1); + list_remove(&light->changed_entry); + light->changed = false; + } + } + if (changed->ffp_ps_constants) { static const struct wined3d_color specular_enabled = {1.0f, 1.0f, 1.0f, 0.0f};