Module: wine Branch: master Commit: e5652dbdb459a650267db57e98d9df63d204a631 URL: https://gitlab.winehq.org/wine/wine/-/commit/e5652dbdb459a650267db57e98d9df6...
Author: Matteo Bruni mbruni@codeweavers.com Date: Wed Sep 6 18:34:35 2023 +0200
wined3d: Skip acquiring a context for an offscreen resource in texture2d_read_from_framebuffer().
---
dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 99338b91d5b..87b3d3c38a4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -368,7 +368,7 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
restore_texture = context->current_rt.texture; restore_idx = context->current_rt.sub_resource_idx; - if (restore_texture != texture || restore_idx != sub_resource_idx) + if (!wined3d_resource_is_offscreen(resource) && (restore_texture != texture || restore_idx != sub_resource_idx)) context = context_acquire(device, texture, sub_resource_idx); else restore_texture = NULL;