I'm not sure this is 100% safe (maybe limiting those blits to sysmem textures would be better like stated in the original change?)
-- v5: wined3d: Don't reject blits coming from older CS thread.
From: Aida Jonikienė aidas957@gmail.com
This is a partial revert of commit db6f95880c2631b64e48adc547d365e878ae45a6.
GTA 2 is missing non-text textures after exiting from the game to the menu screen when cross-CS thread blits are completely rejected. --- dlls/wined3d/texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 2efdaf91438..16116eb09d9 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3902,9 +3902,9 @@ HRESULT CDECL wined3d_device_context_blt(struct wined3d_device_context *context, return WINED3DERR_INVALIDCALL; }
- if (dst_texture->resource.device != src_texture->resource.device) + if (src_texture->resource.device->cs->thread_id > dst_texture->resource.device->cs->thread_id) { - FIXME("Rejecting cross-device blit.\n"); + FIXME("Rejecting blit from newer CS thread.\n"); return E_NOTIMPL; }
Why does GTA 2 use an older CS thread inside src_texture in my real-world test case? Is there some parent context/device thing I'm not aware of?
The ddraw tests have the opposite behavior (and obviously trigger the CS thread assert) so I'm checking for it and rejecting blits there (which does allow ddraw tests to work well enough)