On Wed, Feb 28, 2018 at 4:26 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
On 28 February 2018 at 12:12, Józef Kucia <jkucia(a)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.