Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision b01b50c40d6cfb28d8e12f40f6f76c71dce70a0e)
+++ vulkan-game.cpp	(revision 67527a5eabbaf5ed7d062a8bd98c10598aa42fe6)
@@ -113,30 +113,30 @@
                                                       deviceProperties.limits.minUniformBufferOffsetAlignment);
 
-   objects_modelPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.maxStorageBufferRange,
-                                                          deviceProperties.limits.minStorageBufferOffsetAlignment);
+   objects_modelPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.maxUniformBufferRange,
+                                                          deviceProperties.limits.minUniformBufferOffsetAlignment);
 
    uniforms_shipPipeline = VulkanBuffer<UBO_VP_mats>(1, deviceProperties.limits.maxUniformBufferRange,
                                                      deviceProperties.limits.minUniformBufferOffsetAlignment);
 
-   objects_shipPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.maxStorageBufferRange,
-                                                         deviceProperties.limits.minStorageBufferOffsetAlignment);
+   objects_shipPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.maxUniformBufferRange,
+                                                         deviceProperties.limits.minUniformBufferOffsetAlignment);
 
    uniforms_asteroidPipeline = VulkanBuffer<UBO_VP_mats>(1, deviceProperties.limits.maxUniformBufferRange,
                                                          deviceProperties.limits.minUniformBufferOffsetAlignment);
 
-   objects_asteroidPipeline = VulkanBuffer<SSBO_Asteroid>(10, deviceProperties.limits.maxStorageBufferRange,
-                                                          deviceProperties.limits.minStorageBufferOffsetAlignment);
+   objects_asteroidPipeline = VulkanBuffer<SSBO_Asteroid>(10, deviceProperties.limits.maxUniformBufferRange,
+                                                          deviceProperties.limits.minUniformBufferOffsetAlignment);
 
    uniforms_laserPipeline = VulkanBuffer<UBO_VP_mats>(1, deviceProperties.limits.maxUniformBufferRange,
                                                       deviceProperties.limits.minUniformBufferOffsetAlignment);
 
-   objects_laserPipeline = VulkanBuffer<SSBO_Laser>(2, deviceProperties.limits.maxStorageBufferRange,
-                                                    deviceProperties.limits.minStorageBufferOffsetAlignment);
+   objects_laserPipeline = VulkanBuffer<SSBO_Laser>(2, deviceProperties.limits.maxUniformBufferRange,
+                                                    deviceProperties.limits.minUniformBufferOffsetAlignment);
 
    uniforms_explosionPipeline = VulkanBuffer<UBO_Explosion>(1, deviceProperties.limits.maxUniformBufferRange,
                                                             deviceProperties.limits.minUniformBufferOffsetAlignment);
 
-   objects_explosionPipeline = VulkanBuffer<SSBO_Explosion>(2, deviceProperties.limits.maxStorageBufferRange,
-                                                            deviceProperties.limits.minStorageBufferOffsetAlignment);
+   objects_explosionPipeline = VulkanBuffer<SSBO_Explosion>(2, deviceProperties.limits.maxUniformBufferRange,
+                                                            deviceProperties.limits.minUniformBufferOffsetAlignment);
 
    initImGuiOverlay();
@@ -166,5 +166,5 @@
    createBufferSet(objects_modelPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_modelPipeline);
@@ -174,5 +174,5 @@
    modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_modelPipeline.infoSet);
-   modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+   modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
       VK_SHADER_STAGE_VERTEX_BIT, &objectBuffers_modelPipeline.infoSet);
    modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
@@ -240,5 +240,5 @@
    createBufferSet(objects_shipPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_shipPipeline);
@@ -248,5 +248,5 @@
    shipPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_shipPipeline.infoSet);
-   shipPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+   shipPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
       VK_SHADER_STAGE_VERTEX_BIT, &objectBuffers_shipPipeline.infoSet);
 
@@ -511,5 +511,5 @@
    createBufferSet(objects_asteroidPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_asteroidPipeline);
@@ -519,5 +519,5 @@
    asteroidPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_asteroidPipeline.infoSet);
-   asteroidPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+   asteroidPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
       VK_SHADER_STAGE_VERTEX_BIT, &objectBuffers_asteroidPipeline.infoSet);
 
@@ -540,5 +540,5 @@
    createBufferSet(objects_laserPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_laserPipeline);
@@ -548,5 +548,5 @@
    laserPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_laserPipeline.infoSet);
-   laserPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+   laserPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
       VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, &objectBuffers_laserPipeline.infoSet);
    laserPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
@@ -571,5 +571,5 @@
    createBufferSet(objects_explosionPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_explosionPipeline);
@@ -579,5 +579,5 @@
    explosionPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_explosionPipeline.infoSet);
-   explosionPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+   explosionPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
       VK_SHADER_STAGE_VERTEX_BIT, &objectBuffers_explosionPipeline.infoSet);
 
@@ -1107,9 +1107,11 @@
    }
 
-   VulkanUtils::copyDataToMappedMemory(device, uniforms_modelPipeline.data(), uniforms_modelPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, uniforms_modelPipeline.data(),
+                                       uniforms_modelPipeline.mapped(imageIndex),
                                        uniformBuffers_modelPipeline.memory[imageIndex],
                                        uniforms_modelPipeline.memorySize(), true);
 
-   VulkanUtils::copyDataToMappedMemory(device, objects_modelPipeline.data(), objects_modelPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, objects_modelPipeline.data(),
+                                       objects_modelPipeline.mapped(imageIndex),
                                        objectBuffers_modelPipeline.memory[imageIndex],
                                        objects_modelPipeline.memorySize(), true);
@@ -1137,9 +1139,11 @@
    }
 
-   VulkanUtils::copyDataToMappedMemory(device, uniforms_shipPipeline.data(), uniforms_shipPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, uniforms_shipPipeline.data(),
+                                       uniforms_shipPipeline.mapped(imageIndex),
                                        uniformBuffers_shipPipeline.memory[imageIndex],
                                        uniforms_shipPipeline.memorySize(), true);
 
-   VulkanUtils::copyDataToMappedMemory(device, objects_shipPipeline.data(), objects_shipPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, objects_shipPipeline.data(),
+                                       objects_shipPipeline.mapped(imageIndex),
                                        objectBuffers_shipPipeline.memory[imageIndex],
                                        objects_shipPipeline.memorySize(), true);
@@ -1190,9 +1194,11 @@
    }
 
-   VulkanUtils::copyDataToMappedMemory(device, uniforms_asteroidPipeline.data(), uniforms_asteroidPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, uniforms_asteroidPipeline.data(),
+                                       uniforms_asteroidPipeline.mapped(imageIndex),
                                        uniformBuffers_asteroidPipeline.memory[imageIndex],
                                        uniforms_asteroidPipeline.memorySize(), true);
 
-   VulkanUtils::copyDataToMappedMemory(device, objects_asteroidPipeline.data(), objects_asteroidPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, objects_asteroidPipeline.data(),
+                                       objects_asteroidPipeline.mapped(imageIndex),
                                        objectBuffers_asteroidPipeline.memory[imageIndex],
                                        objects_asteroidPipeline.memorySize(), true);
@@ -1226,9 +1232,11 @@
    }
 
-   VulkanUtils::copyDataToMappedMemory(device, uniforms_laserPipeline.data(), uniforms_laserPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, uniforms_laserPipeline.data(),
+                                       uniforms_laserPipeline.mapped(imageIndex),
                                        uniformBuffers_laserPipeline.memory[imageIndex],
                                        uniforms_laserPipeline.memorySize(), true);
 
-   VulkanUtils::copyDataToMappedMemory(device, objects_laserPipeline.data(), objects_laserPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, objects_laserPipeline.data(),
+                                       objects_laserPipeline.mapped(imageIndex),
                                        objectBuffers_laserPipeline.memory[imageIndex],
                                        objects_laserPipeline.memorySize(), true);
@@ -1261,9 +1269,11 @@
    }
 
-   VulkanUtils::copyDataToMappedMemory(device, uniforms_explosionPipeline.data(), uniforms_explosionPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, uniforms_explosionPipeline.data(),
+                                       uniforms_explosionPipeline.mapped(imageIndex),
                                        uniformBuffers_explosionPipeline.memory[imageIndex],
                                        uniforms_explosionPipeline.memorySize(), true);
 
-   VulkanUtils::copyDataToMappedMemory(device, objects_explosionPipeline.data(), objects_explosionPipeline.mapped(imageIndex),
+   VulkanUtils::copyDataToMappedMemory(device, objects_explosionPipeline.data(),
+                                       objects_explosionPipeline.mapped(imageIndex),
                                        objectBuffers_explosionPipeline.memory[imageIndex],
                                        objects_explosionPipeline.memorySize(), true);
@@ -1863,9 +1873,9 @@
    // TODO: Find a more elegant, per-screen solution for this
    if (currentRenderScreenFn == &VulkanGame::renderGameScreen) {
-      modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {});
-      shipPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {});
-      asteroidPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {});
-      laserPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {});
-      explosionPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {});
+      modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 });
+      shipPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 });
+      asteroidPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 });
+      laserPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 });
+      explosionPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 });
    }
 
@@ -2315,5 +2325,5 @@
    createBufferSet(objects_modelPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_modelPipeline);
@@ -2335,5 +2345,5 @@
    createBufferSet(objects_shipPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_shipPipeline);
@@ -2355,5 +2365,5 @@
    createBufferSet(objects_asteroidPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_asteroidPipeline);
@@ -2375,5 +2385,5 @@
    createBufferSet(objects_laserPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_laserPipeline);
@@ -2395,5 +2405,5 @@
    createBufferSet(objects_explosionPipeline.memorySize(),
                    VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT
-                   | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+                   | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
                    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
                    objectBuffers_explosionPipeline);
