# HG changeset patch # User Sam # Date 1684605895 -25200 # Node ID 120a1baf2f8d44b742022869fa543f1b14412c15 # Parent 8a5521174cc0258f1ab2f6b19934f4096d1a00d5 del: possible bad use of variable diff -r 8a5521174cc0 -r 120a1baf2f8d 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 8a5521174cc0 -r 120a1baf2f8d 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)