Freeze texture transitions while attached; consolidate OutputAttachment usage (#67)

* lock usages for attachments during subpasses
* refactor IsTextureTransitionPossible
* change attachment usages to OutputAttachment
* make SetBindGroup validation lazier
This commit is contained in:
Kai Ninomiya
2017-07-07 16:06:14 -07:00
committed by GitHub
parent 794d4faece
commit cb2d6d8553
9 changed files with 90 additions and 59 deletions

View File

@@ -48,8 +48,8 @@ class InputStateTest : public NXTTest {
.SetExtent(kRTSize, kRTSize, 1)
.SetFormat(nxt::TextureFormat::R8G8B8A8Unorm)
.SetMipLevels(1)
.SetAllowedUsage(nxt::TextureUsageBit::ColorAttachment | nxt::TextureUsageBit::TransferSrc)
.SetInitialUsage(nxt::TextureUsageBit::ColorAttachment)
.SetAllowedUsage(nxt::TextureUsageBit::OutputAttachment | nxt::TextureUsageBit::TransferSrc)
.SetInitialUsage(nxt::TextureUsageBit::OutputAttachment)
.GetResult();
renderTargetView = renderTarget.CreateTextureViewBuilder().GetResult();