[PATCH 5/5] wined3d: Reference the source/destination bo in wined3d_texture_copy_sysmem_location().
Henri Verbeet
hverbeet at codeweavers.com
Wed Dec 2 10:30:01 CST 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/texture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index b84b68c592b..1e410930a8b 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -636,6 +636,7 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, dst_bo->id));
GL_EXTCALL(glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, size, src.addr));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ wined3d_context_gl_reference_bo(wined3d_context_gl(context), dst_bo);
checkGLcall("PBO upload");
context_release(context);
return TRUE;
@@ -648,6 +649,7 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, src_bo->id));
GL_EXTCALL(glGetBufferSubData(GL_PIXEL_PACK_BUFFER, 0, size, dst.addr));
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
+ wined3d_context_gl_reference_bo(wined3d_context_gl(context), src_bo);
checkGLcall("PBO download");
context_release(context);
return TRUE;
--
2.20.1
More information about the wine-devel
mailing list