diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 682b1d8e977..fa7c6ddfa3d 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -397,7 +397,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data) state = &device->state; wined3d_get_draw_rect(state, &draw_rect); device_clear_render_targets(device, device->adapter->gl_info.limits.buffers, - &device->fb, op->rect_count, op->rects, &draw_rect, op->flags, + cs->state.fb, op->rect_count, op->rects, &draw_rect, op->flags, &op->color, op->depth, op->stencil); if (op->flags & WINED3DCLEAR_TARGET) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2b95f5071db..c3703a57253 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -223,7 +223,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c struct wined3d_surface *target = rtv ? wined3d_rendertarget_view_get_surface(rtv) : NULL; struct wined3d_rendertarget_view *dsv = fb->depth_stencil; struct wined3d_surface *depth_stencil = dsv ? wined3d_rendertarget_view_get_surface(dsv) : NULL; - const struct wined3d_state *state = &device->state; + const struct wined3d_state *state = &device->cs->state; const struct wined3d_gl_info *gl_info; UINT drawable_width, drawable_height; struct wined3d_color corrected_color;