# HG changeset patch # User sam # Date 1722335021 -25200 # Node ID 8abddbe609ce0fdc399a7c94daedc4b5118a217c # Parent bc03dc1efe6ea039518d22bb49edb04bed0adf3b del: unused parameter diff -r bc03dc1efe6e -r 8abddbe609ce semicongine/rendering/renderer.nim --- a/semicongine/rendering/renderer.nim Tue Jul 30 16:13:31 2024 +0700 +++ b/semicongine/rendering/renderer.nim Tue Jul 30 17:23:41 2024 +0700 @@ -279,7 +279,7 @@ result.rawPointer = selectedBlock.rawPointer.pointerAddOffset(selectedBlock.offsetNextFree) renderData.memory[memoryType][selectedBlockI].offsetNextFree += memoryRequirements.size -proc updateGPUBuffer*(gpuData: GPUData, flush = false, allFrames = false) = +proc updateGPUBuffer*(gpuData: GPUData, flush = false) = if gpuData.size == 0: return @@ -291,14 +291,14 @@ withStagingBuffer((gpuData.buffer.vk, gpuData.offset), gpuData.size, stagingPtr): copyMem(stagingPtr, gpuData.rawPointer, gpuData.size) -proc updateAllGPUBuffers*[T](value: T, flush = false, allFrames = false) = +proc updateAllGPUBuffers*[T](value: T, flush = false) = for name, fieldvalue in value.fieldPairs(): when typeof(fieldvalue) is GPUData: - updateGPUBuffer(fieldvalue, flush = flush, allFrames = allFrames) + updateGPUBuffer(fieldvalue, flush = flush) when typeof(fieldvalue) is array: when elementType(fieldvalue) is GPUData: for entry in fieldvalue: - updateGPUBuffer(entry, flush = flush, allFrames = allFrames) + updateGPUBuffer(entry, flush = flush) proc allocateGPUData( renderdata: var RenderData, @@ -348,7 +348,7 @@ (v.buffer, v.offset) = allocateGPUData(renderdata, v.bufferType, v.size) if uploadData: - updateAllGPUBuffers(data, flush = true, allFrames = true) + updateAllGPUBuffers(data, flush = true) proc assignBuffers*(renderdata: var RenderData, descriptorSet: var DescriptorSet, uploadData = true) = assignBuffers(renderdata, descriptorSet.data, uploadData = uploadData)