[PATCH 1/5] wined3d: Reference the source/destination bo in wined3d_context_gl_copy_bo_address().
Henri Verbeet
hverbeet at codeweavers.com
Tue Dec 1 11:08:01 CST 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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
{
--
2.20.1
More information about the wine-devel
mailing list