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

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-11-23 14:41:14 +01:00 committed by Alexandre Julliard
parent ccb06c6b6f
commit 8890ece54c

View file

@ -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