rsx: Implement deferred buffer allocations for GPU write

This commit is contained in:
kd-11 2023-03-01 23:04:41 +03:00 committed by kd-11
parent 0178b20983
commit a3ededdcf1
7 changed files with 116 additions and 40 deletions

View file

@ -607,7 +607,8 @@ namespace gl
for (const rsx::subresource_layout& layout : input_layouts)
{
upload_texture_subresource(staging_buffer, layout, format, is_swizzled, caps);
rsx::io_buffer io_buf = staging_buffer;
upload_texture_subresource(io_buf, layout, format, is_swizzled, caps);
switch (dst->get_target())
{
@ -704,8 +705,9 @@ namespace gl
dst_buffer = { reinterpret_cast<std::byte*>(upload_scratch_mem.first), image_linear_size };
}
rsx::io_buffer io_buf = dst_buffer;
caps.supports_hw_deswizzle = (is_swizzled && driver_caps.ARB_compute_shader_supported && image_linear_size > 4096);
auto op = upload_texture_subresource(dst_buffer, layout, format, is_swizzled, caps);
auto op = upload_texture_subresource(io_buf, layout, format, is_swizzled, caps);
// Define upload region
coord3u region;