mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
Remove explicit usage transition from the API and validation
This removes the following for both Buffer and Texture: - The builder's SetInitialUsage - The object's FreezeUsage and TransitionUsage methods - The CommandBuffer Transition<Object>Usage methods All samples and tests are simplified as a result. This also obsoletes the UsageValidationTest which is removed. Some validation was dependent on "current usage" and hasn't been reintroduced for implicit transitions yet: - Buffers can be used while mapped - Swapchain textures can be used after they have been presented. Validation for these will involve collecting all the resources used by a command buffer and will be done in a follow-up patch.
This commit is contained in:
committed by
Corentin Wallez
parent
d2312e8138
commit
d8c068fb4f
@@ -28,7 +28,6 @@ nxt::TextureView Create2DAttachment(nxt::Device& device, uint32_t width, uint32_
|
||||
.SetFormat(format)
|
||||
.SetMipLevels(1)
|
||||
.SetAllowedUsage(nxt::TextureUsageBit::OutputAttachment)
|
||||
.SetInitialUsage(nxt::TextureUsageBit::OutputAttachment)
|
||||
.GetResult();
|
||||
|
||||
return attachment.CreateTextureViewBuilder()
|
||||
|
||||
Reference in New Issue
Block a user