Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9ee2541

Browse files
committed
fix comment
1 parent 7ec34f2 commit 9ee2541

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

impeller/renderer/backend/vulkan/allocator_vk.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,21 @@ static constexpr vk::ImageUsageFlags ToVKImageUsageFlags(PixelFormat format,
132132

133133
if (usage & static_cast<TextureUsageMask>(TextureUsage::kShaderRead)) {
134134
vk_usage |= vk::ImageUsageFlagBits::eSampled;
135-
// unmark the usage as transient if it is used as a sampled image
136-
// See: https://github.com/flutter/flutter/issues/121633
135+
// Device transient images can only be used as attachments. The caller
136+
// specified incorrect usage flags and is attempting to read a device
137+
// transient image in a shader. Unset the transient attachment flag. See:
138+
// https://github.com/flutter/flutter/issues/121633
137139
if (mode == StorageMode::kDeviceTransient) {
138140
vk_usage &= ~vk::ImageUsageFlagBits::eTransientAttachment;
139141
}
140142
}
141143

142144
if (usage & static_cast<TextureUsageMask>(TextureUsage::kShaderWrite)) {
143145
vk_usage |= vk::ImageUsageFlagBits::eStorage;
144-
// unmark the usage as transient if it is used as a storage image
145-
// See: https://github.com/flutter/flutter/issues/121633
146+
// Device transient images can only be used as attachments. The caller
147+
// specified incorrect usage flags and is attempting to read a device
148+
// transient image in a shader. Unset the transient attachment flag. See:
149+
// https://github.com/flutter/flutter/issues/121633
146150
if (mode == StorageMode::kDeviceTransient) {
147151
vk_usage &= ~vk::ImageUsageFlagBits::eTransientAttachment;
148152
}

0 commit comments

Comments
 (0)