mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-23 19:54:16 +01:00
[dxvk] Don't transition image layout in clearImageViewCs unless necessary
This commit is contained in:
parent
6d9e0baa27
commit
9389a0ca96
@ -3879,10 +3879,14 @@ namespace dxvk {
|
||||
str::format("Clear view (", dstName ? dstName : "unknown", ")").c_str()));
|
||||
}
|
||||
|
||||
// Avoid inserting useless barriers if the image is already in the correct layout
|
||||
if (imageView->image()->info().layout != VK_IMAGE_LAYOUT_GENERAL
|
||||
|| !imageView->image()->isInitialized(imageView->imageSubresources())) {
|
||||
addImageLayoutTransition(*imageView->image(), imageView->imageSubresources(),
|
||||
VK_IMAGE_LAYOUT_GENERAL, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_WRITE_BIT,
|
||||
imageView->image()->isFullSubresource(vk::pickSubresourceLayers(imageView->imageSubresources(), 0), extent));
|
||||
flushImageLayoutTransitions(cmdBuffer);
|
||||
}
|
||||
|
||||
// Query pipeline objects to use for this clear operation
|
||||
DxvkMetaClearPipeline pipeInfo = m_common->metaClear().getClearImagePipeline(
|
||||
|
Loading…
x
Reference in New Issue
Block a user