Remove in-pass transitions in HelloCompute

This isn't validated out yet.
This commit is contained in:
Corentin Wallez 2018-04-18 15:18:31 -04:00 committed by Corentin Wallez
parent 46d5441557
commit 18ae692a21
1 changed files with 2 additions and 2 deletions

View File

@ -137,17 +137,17 @@ void frame() {
GetNextFramebuffer(device, renderpass, swapchain, depthStencilView, &backbuffer, &framebuffer);
nxt::CommandBuffer commands = device.CreateCommandBufferBuilder()
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Storage)
.BeginComputePass()
.SetComputePipeline(computePipeline)
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Storage)
.SetBindGroup(0, computeBindGroup)
.Dispatch(1, 1, 1)
.EndComputePass()
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Uniform)
.BeginRenderPass(renderpass, framebuffer)
.BeginRenderSubpass()
.SetRenderPipeline(renderPipeline)
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Uniform)
.SetBindGroup(0, renderBindGroup)
.DrawArrays(3, 1, 0, 0)
.EndRenderSubpass()