On 30 April 2015 at 00:00, Stefan Dösinger stefan@codeweavers.com wrote:
@@ -2342,12 +2352,14 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win ++i; } context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets,
wined3d_rendertarget_view_get_surface(fb->depth_stencil),
rt_count ? rts[0]->resource->draw_binding : WINED3D_LOCATION_TEXTURE_RGB);
wined3d_rendertarget_view_get_surface(dsv),
rt_count ? rts[0]->resource->draw_binding : WINED3D_LOCATION_TEXTURE_RGB,
dsv ? dsv->resource->draw_binding : WINED3D_LOCATION_TEXTURE_RGB); }
This works because we mostly just care that the color location isn't WINED3D_LOCATION_DRAWABLE if there's no attachment. (In particular for the case where the application is doing depth only rendering.) Strictly speaking though, it's probably more correct to use the color location if there's no depth/stencil attachment, to avoid silliness like the color attachment being in WINED3D_LOCATION_DRAWABLE and the depth/stencil attachment in WINED3D_LOCATION_TEXTURE_RGB. In fact, now that the color and depth/stencil locations are separate, you can probably just pass 0.