TextureVk: Add a couple TODOs related to barriers.
Bug: None
Change-Id: I2da575ce7b79c92f5a2a320334e51e571f672b46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28003
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/vulkan/TextureVk.cpp b/src/dawn_native/vulkan/TextureVk.cpp
index e61facd..f45e2b4 100644
--- a/src/dawn_native/vulkan/TextureVk.cpp
+++ b/src/dawn_native/vulkan/TextureVk.cpp
@@ -51,6 +51,8 @@
}
// Computes which vulkan access type could be required for the given Dawn usage.
+ // TODO(cwallez@chromium.org): We shouldn't need any access usages for srcAccessMask when
+ // the previous usage is readonly because an execution dependency is sufficient.
VkAccessFlags VulkanAccessFlags(wgpu::TextureUsage usage, const Format& format) {
VkAccessFlags flags = 0;
@@ -151,6 +153,9 @@
flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
}
if (usage & (wgpu::TextureUsage::Sampled | kReadonlyStorageTexture)) {
+ // TODO(cwallez@chromium.org): Only transition to the usage we care about to avoid
+ // introducing FS -> VS dependencies that would prevent parallelization on tiler
+ // GPUs
flags |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;