Commit 20c828bd authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Reference the source/destination bo in wined3d_context_gl_copy_bo_address().

parent 09b6efd6
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment