mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
vk: Allocate enough scratch memory for GPU deswizzle
- Forgot to take alignment into account.
This commit is contained in:
parent
13abe785a9
commit
abd8bbd6ef
1 changed files with 3 additions and 1 deletions
|
@ -968,7 +968,9 @@ namespace vk
|
|||
{
|
||||
if (!scratch_buf)
|
||||
{
|
||||
scratch_buf = vk::get_scratch_buffer(image_linear_size * 2);
|
||||
// Calculate enough scratch memory. We need 2x the size of layer 0 to fit all the mip levels and an extra 128 bytes per level as alignment overhead.
|
||||
const auto scratch_buf_size = 128u * ::size32(subresource_layout) + image_linear_size + image_linear_size;
|
||||
scratch_buf = vk::get_scratch_buffer(scratch_buf_size);
|
||||
buffer_copies.reserve(subresource_layout.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue