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); GetNextFramebuffer(device, renderpass, swapchain, depthStencilView, &backbuffer, &framebuffer);
nxt::CommandBuffer commands = device.CreateCommandBufferBuilder() nxt::CommandBuffer commands = device.CreateCommandBufferBuilder()
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Storage)
.BeginComputePass() .BeginComputePass()
.SetComputePipeline(computePipeline) .SetComputePipeline(computePipeline)
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Storage)
.SetBindGroup(0, computeBindGroup) .SetBindGroup(0, computeBindGroup)
.Dispatch(1, 1, 1) .Dispatch(1, 1, 1)
.EndComputePass() .EndComputePass()
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Uniform)
.BeginRenderPass(renderpass, framebuffer) .BeginRenderPass(renderpass, framebuffer)
.BeginRenderSubpass() .BeginRenderSubpass()
.SetRenderPipeline(renderPipeline) .SetRenderPipeline(renderPipeline)
.TransitionBufferUsage(buffer, nxt::BufferUsageBit::Uniform)
.SetBindGroup(0, renderBindGroup) .SetBindGroup(0, renderBindGroup)
.DrawArrays(3, 1, 0, 0) .DrawArrays(3, 1, 0, 0)
.EndRenderSubpass() .EndRenderSubpass()