[PATCH 4/8] wined3d: Fix draw calls when first render target is NULL.
Józef Kucia
joseph.kucia at gmail.com
Wed Feb 28 13:30:43 CST 2018
On Wed, Feb 28, 2018 at 4:26 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> 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?
The main problem is color_location set to 0 in context_state_fb().
>
>> @@ -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.
>
>
Yes, context_acquire_for_draw_call() should not be necessary. I'll
send a v2. Thanks.
More information about the wine-devel
mailing list