=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Do not crash when trying to draw to buffer render target.

Alexandre Julliard julliard at winehq.org
Fri Nov 23 14:18:02 CST 2018


Module: wine
Branch: master
Commit: 8890ece54cf258906c41b4dd63c6b7b8bf48fab8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8890ece54cf258906c41b4dd63c6b7b8bf48fab8

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Fri Nov 23 14:41:14 2018 +0100

wined3d: Do not crash when trying to draw to buffer render target.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 4cd46c6..4096673 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -4840,6 +4840,13 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
 
     if (!(rtv = fb->render_targets[0]))
         rtv = fb->depth_stencil;
+
+    if (rtv && rtv->resource->type == WINED3D_RTYPE_BUFFER)
+    {
+        FIXME("Buffer render targets not implemented.\n");
+        return;
+    }
+
     if (rtv)
         context = context_acquire(device, wined3d_texture_from_resource(rtv->resource), rtv->sub_resource_idx);
     else




More information about the wine-cvs mailing list