mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
vk: Improve compute->compute barrier before detiling
This commit is contained in:
parent
041daab068
commit
ed93bbd16d
1 changed files with 4 additions and 1 deletions
|
@ -189,13 +189,16 @@ namespace vk
|
|||
// Compute -> Compute barrier
|
||||
vk::insert_buffer_memory_barrier(cmd, working_buffer->value, 0, task_length,
|
||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
||||
VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT);
|
||||
VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT);
|
||||
|
||||
// We don't need to calibrate write if two conditions are met:
|
||||
// 1. The start offset of our 2D region is a multiple of 64 lines
|
||||
// 2. We use the whole pitch.
|
||||
// If these conditions are not met, we need to upload the entire tile (or at least the affected tiles wholly)
|
||||
|
||||
// FIXME: There is a 3rd condition - write onto already-persisted range. e.g One transfer copies half the image then the other half is copied later.
|
||||
// We don't need to load again for the second copy in that scenario.
|
||||
|
||||
if (valid_range.start != dma_sync_region.start || real_pitch != tiled_region.tile->pitch)
|
||||
{
|
||||
// Tile indices run to the end of the row (full pitch).
|
||||
|
|
Loading…
Add table
Reference in a new issue