[PATCH 4/5] wined3d: Use the command stream state in device_clear_render_targets().

Henri Verbeet hverbeet at codeweavers.com
Sun Feb 26 00:46:34 CST 2017


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/cs.c     | 2 +-
 dlls/wined3d/device.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 682b1d8..fa7c6dd 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 2b95f50..c3703a5 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;
-- 
2.1.4




More information about the wine-patches mailing list