Henri Verbeet : wined3d: Reference the source/destination bo in wined3d_context_gl_copy_bo_address().
Alexandre Julliard
julliard at winehq.org
Tue Dec 1 15:40:36 CST 2020
Module: wine
Branch: master
Commit: 20c828bdc5faf5786192a48dddcb8e9e6313d284
URL: https://source.winehq.org/git/wine.git/?a=commit;h=20c828bdc5faf5786192a48dddcb8e9e6313d284
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Dec 1 20:56:01 2020 +0330
wined3d: Reference the source/destination bo in wined3d_context_gl_copy_bo_address().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context_gl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index ee1adfcf559..4aaf50434a6 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -2728,6 +2728,9 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl,
GL_EXTCALL(glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
(GLintptr)src->addr, (GLintptr)dst->addr, size));
checkGLcall("direct buffer copy");
+
+ wined3d_context_gl_reference_bo(context_gl, src_bo);
+ wined3d_context_gl_reference_bo(context_gl, dst_bo);
}
else
{
@@ -2747,12 +2750,16 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl,
wined3d_context_gl_bind_bo(context_gl, src_bo->binding, src_bo->id);
GL_EXTCALL(glGetBufferSubData(src_bo->binding, (GLintptr)src->addr, size, dst->addr));
checkGLcall("buffer download");
+
+ wined3d_context_gl_reference_bo(context_gl, src_bo);
}
else if (dst_bo && !src_bo)
{
wined3d_context_gl_bind_bo(context_gl, dst_bo->binding, dst_bo->id);
GL_EXTCALL(glBufferSubData(dst_bo->binding, (GLintptr)dst->addr, size, src->addr));
checkGLcall("buffer upload");
+
+ wined3d_context_gl_reference_bo(context_gl, dst_bo);
}
else
{
More information about the wine-cvs
mailing list