gl: Fix a long-standing regression with typeless transfer caused by a typo.

- The parameters for the final upload should be 'unpack_info' not 'pack_info'!
This commit is contained in:
kd-11 2020-02-05 22:54:45 +03:00 committed by kd-11
parent 18e0559438
commit 50b1e26b17
2 changed files with 6 additions and 1 deletions

View File

@ -236,6 +236,9 @@ OPENGL_PROC(PFNGLTEXTUREBARRIERPROC, TextureBarrier);
OPENGL_PROC(PFNGLTEXTUREBARRIERNVPROC, TextureBarrierNV);
//...
// Memory barrier
OPENGL_PROC(PFNGLMEMORYBARRIERPROC, MemoryBarrier);
// ARB_compute_shader
OPENGL_PROC(PFNGLDISPATCHCOMPUTEPROC, DispatchCompute);

View File

@ -824,11 +824,13 @@ namespace gl
if (src_transform)
{
src_transform->run(&g_typeless_transfer_buffer, job_length);
glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT | GL_PIXEL_BUFFER_BARRIER_BIT);
}
if (dst_transform)
{
dst_transform->run(&g_typeless_transfer_buffer, job_length);
glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT);
}
// NOTE: glBindBufferRange also binds the buffer to the old-school target.
@ -841,7 +843,7 @@ namespace gl
}
g_typeless_transfer_buffer.bind(buffer::target::pixel_unpack);
dst->copy_from(nullptr, static_cast<texture::format>(pack_info.format), static_cast<texture::type>(pack_info.type), dst_region, unpack_settings);
dst->copy_from(nullptr, static_cast<texture::format>(unpack_info.format), static_cast<texture::type>(unpack_info.type), dst_region, unpack_settings);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, GL_NONE);
}