# HG changeset patch # User Sam # Date 1684605895 -25200 # Node ID 66205c67df6c09783da62cc6663452ef3a2d9e4a # Parent 671b9267a5332c23819e5097fca1127b49dec23d del: possible bad use of variable diff -r 671b9267a533 -r 66205c67df6c src/semicongine/renderer.nim --- a/src/semicongine/renderer.nim Sun May 21 00:33:38 2023 +0700 +++ b/src/semicongine/renderer.nim Sun May 21 01:04:55 2023 +0700 @@ -251,10 +251,9 @@ commandBuffer.beginRenderCommands(renderer.renderPass, renderer.swapchain.currentFramebuffer()) for i in 0 ..< renderer.renderPass.subpasses.len: - var subpass = renderer.renderPass.subpasses[i] - for pipeline in subpass.pipelines.mitems: - commandBuffer.vkCmdBindPipeline(subpass.pipelineBindPoint, pipeline.vk) - commandBuffer.vkCmdBindDescriptorSets(subpass.pipelineBindPoint, pipeline.layout, 0, 1, addr(renderer.scenedata[scene].descriptorSets[pipeline.vk][renderer.swapchain.currentInFlight].vk), 0, nil) + for pipeline in renderer.renderPass.subpasses[i].pipelines.mitems: + commandBuffer.vkCmdBindPipeline(renderer.renderPass.subpasses[i].pipelineBindPoint, pipeline.vk) + commandBuffer.vkCmdBindDescriptorSets(renderer.renderPass.subpasses[i].pipelineBindPoint, pipeline.layout, 0, 1, addr(renderer.scenedata[scene].descriptorSets[pipeline.vk][renderer.swapchain.currentInFlight].vk), 0, nil) debug "Scene buffers:" for (location, buffer) in renderer.scenedata[scene].vertexBuffers.pairs: diff -r 671b9267a533 -r 66205c67df6c src/semicongine/vulkan/instance.nim --- a/src/semicongine/vulkan/instance.nim Sun May 21 00:33:38 2023 +0700 +++ b/src/semicongine/vulkan/instance.nim Sun May 21 01:04:55 2023 +0700 @@ -58,6 +58,7 @@ for i in layers: if i in getLayers(): availableLayers.add i + debug "Enabled layers: " & $availableLayers var layersC = allocCStringArray(availableLayers) instanceExtensionsC = allocCStringArray(requiredExtensions)