But in VulkanQueue::prepareForUpload I see:A common misconception I see is that _READ flags are passed into srcAccessMask, but this is redundant. It does not make sense to make reads available, i.e. you don’t flush caches when you’re done reading data.
Code: Select all
if( buffer )
{
BufferPackedDownloadMap::iterator it = mCopyDownloadBuffers.find( buffer );
if( it == mCopyDownloadBuffers.end() )
bufferAccessFlags = VulkanMappings::get( buffer->getBufferPackedType() );
else
{
if( !it->second )
{
// bufferAccessFlags = VK_ACCESS_TRANSFER_WRITE_BIT;
// We assume consecutive writes means we're writing to non-overlapping areas
// Do not wait for previous transfers.
bufferAccessFlags = 0;
}
else
bufferAccessFlags = VK_ACCESS_TRANSFER_READ_BIT;
}
mCopyDownloadBuffers[buffer] = false;
mCopyEndReadSrcBufferFlags |= VK_ACCESS_TRANSFER_WRITE_BIT;
}
I am not familiar enough yet with the code to know if this is OK, so I wanted to ask you about it.