gl: Rewrite buffer mapping

This commit is contained in:
kd-11 2022-05-25 23:49:08 +03:00 committed by kd-11
parent b61c4d3693
commit ed2068fb03
4 changed files with 22 additions and 15 deletions

View file

@ -706,7 +706,7 @@ namespace gl
{
const u64 row_pitch = rsx::align2<u64, u64>(layout.width_in_block * block_size_in_bytes, caps.alignment);
image_linear_size = row_pitch * layout.height_in_block * layout.depth;
dst_buffer = { reinterpret_cast<std::byte*>(upload_scratch_mem.map(buffer::access::write)), image_linear_size };
dst_buffer = { reinterpret_cast<std::byte*>(upload_scratch_mem.map(0, image_linear_size, gl::buffer::access::write)), image_linear_size };
}
auto op = upload_texture_subresource(dst_buffer, layout, format, is_swizzled, caps);