Mercurial > games > semicongine
changeset 1340:deefc3573b6e
fix: error in static check
author | sam <sam@basx.dev> |
---|---|
date | Sat, 24 Aug 2024 22:30:08 +0700 |
parents | 6e3359477889 |
children | f65f25233127 |
files | semicongine/rendering/renderer.nim |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/rendering/renderer.nim Sat Aug 24 19:31:22 2024 +0700 +++ b/semicongine/rendering/renderer.nim Sat Aug 24 22:30:08 2024 +0700 @@ -554,7 +554,9 @@ renderData.memory[memoryType][selectedBlockI].offsetNextFree += memoryRequirements.size # imageview can only be created after memory is bound - image.imageview = svkCreate2DImageView(image.vk, format, nLayers = image.nLayers, isArray = typeof(image) is ImageArray) + image.imageview = svkCreate2DImageView( + image.vk, format, nLayers = image.nLayers, isArray = typeof(image) is ImageArray + ) renderData.imageViews.add image.imageview # data transfer and layout transition @@ -618,11 +620,13 @@ assert typeof(meshAttrValue) is GPUArray, "Mesh attribute '" & attrName & "' must be a GPUArray" assert typeof(attrValue) is elementType(meshAttrValue.data), - "Type of shader attribute and mesh attribute '" & attrName & "' is not the same (" & typeof(attrValue).name & " and " & elementType(meshAttrValue.data).name & ")" + "Type of shader attribute and mesh attribute '" & attrName & + "' is not the same (" & typeof(attrValue).name & " and " & + elementType(meshAttrValue.data).name & ")" foundAttr = true assert foundAttr, "Attribute '" & attrName & "' is not provided in mesh type '" & name(TMesh) & "'" - if hasCustomPragma(attrValue, InstanceAttribute): + elif hasCustomPragma(attrValue, InstanceAttribute): var foundAttr = false for instAttrName, instAttrValue in default(TInstance).fieldPairs: when attrName == instAttrName: