From 18ae692a21dd9fd2c966097f9faa3759519b96e4 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 18 Apr 2018 15:18:31 -0400 Subject: [PATCH] Remove in-pass transitions in HelloCompute This isn't validated out yet. --- examples/HelloCompute.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/HelloCompute.cpp b/examples/HelloCompute.cpp index eaf66c5247..e3c9f0e0ca 100644 --- a/examples/HelloCompute.cpp +++ b/examples/HelloCompute.cpp @@ -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()