[PATCH 4/8] wined3d: Fix draw calls when first render target is NULL.

Henri Verbeet hverbeet at gmail.com
Wed Feb 28 09:26:25 CST 2018


On 28 February 2018 at 12:12, Józef Kucia <jkucia at codeweavers.com> wrote:
> In Direct3D 10+, the render target at index 0 can be set to NULL.
>
Yes, but draw_primitive() at least seems to account for that. What is
the issue there specifically?

> @@ -4792,12 +4820,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
>      if (!parameters->indirect && !parameters->u.direct.index_count)
>          return;
>
> -    if (!(rtv = fb->render_targets[0]))
> -        rtv = fb->depth_stencil;
> -    if (rtv)
> -        context = context_acquire(device, wined3d_texture_from_resource(rtv->resource), rtv->sub_resource_idx);
> -    else
> -        context = context_acquire(device, NULL, 0);
> +    context = context_acquire_for_draw_call(device, fb);
I.e., here.



More information about the wine-devel mailing list