comparison src/zamikongine/vulkan_helpers.nim @ 22:b45a5d338cd0

did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 00:43:17 +0700
parents b55d6ecde79d
children c3c963e7c1a6
comparison
equal deleted inserted replaced
21:316923e9247c 22:b45a5d338cd0
147 let availableLayers = getValidationLayers() 147 let availableLayers = getValidationLayers()
148 var usableLayers = newSeq[cstring]() 148 var usableLayers = newSeq[cstring]()
149 149
150 when ENABLEVULKANVALIDATIONLAYERS: 150 when ENABLEVULKANVALIDATIONLAYERS:
151 const desiredLayers = ["VK_LAYER_KHRONOS_validation".cstring, "VK_LAYER_MESA_overlay".cstring] 151 const desiredLayers = ["VK_LAYER_KHRONOS_validation".cstring, "VK_LAYER_MESA_overlay".cstring]
152 for layer in desiredLayers: 152 else:
153 if $layer in availableLayers: 153 const desiredLayers = ["VK_LAYER_MESA_overlay".cstring]
154 usableLayers.add(layer) 154 for layer in desiredLayers:
155 if $layer in availableLayers:
156 usableLayers.add(layer)
155 157
156 echo "Available validation layers: ", availableLayers 158 echo "Available validation layers: ", availableLayers
157 echo "Using validation layers: ", usableLayers 159 echo "Using validation layers: ", usableLayers
158 echo "Available extensions: ", availableExtensions 160 echo "Available extensions: ", availableExtensions
159 echo "Using extensions: ", requiredExtensions 161 echo "Using extensions: ", requiredExtensions