Fix CubeReflection transitioning inside a pass

This commit is contained in:
Corentin Wallez 2018-07-09 15:08:59 +02:00 committed by Corentin Wallez
parent e909d4efe1
commit a884cb2479
1 changed files with 2 additions and 1 deletions

View File

@ -280,9 +280,10 @@ void frame() {
GetNextRenderPassDescriptor(device, swapchain, depthStencilView, &backbuffer, &renderPass); GetNextRenderPassDescriptor(device, swapchain, depthStencilView, &backbuffer, &renderPass);
nxt::CommandBuffer commands = device.CreateCommandBufferBuilder() nxt::CommandBuffer commands = device.CreateCommandBufferBuilder()
.TransitionBufferUsage(cameraBuffer, nxt::BufferUsageBit::Uniform)
.BeginRenderPass(renderPass) .BeginRenderPass(renderPass)
.SetRenderPipeline(pipeline) .SetRenderPipeline(pipeline)
.TransitionBufferUsage(cameraBuffer, nxt::BufferUsageBit::Uniform)
.SetBindGroup(0, bindGroup[0]) .SetBindGroup(0, bindGroup[0])
.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets) .SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets)
.SetIndexBuffer(indexBuffer, 0) .SetIndexBuffer(indexBuffer, 0)