From 128b096b6ec51e73df6de64fc87d7da6296e6a27 Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Thu, 10 Oct 2024 17:26:25 +0200 Subject: [PATCH] Set firstInstance to zero Fixes #1159 --- examples/triangle/triangle.cpp | 4 ++-- examples/trianglevulkan13/trianglevulkan13.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/triangle/triangle.cpp b/examples/triangle/triangle.cpp index e9f24817..dd09a7a9 100644 --- a/examples/triangle/triangle.cpp +++ b/examples/triangle/triangle.cpp @@ -979,7 +979,7 @@ public: scissor.offset.x = 0; scissor.offset.y = 0; vkCmdSetScissor(commandBuffer, 0, 1, &scissor); - // Bind descriptor set for the currrent frame's uniform buffer, so the shader uses the data from that buffer for this draw + // Bind descriptor set for the current frame's uniform buffer, so the shader uses the data from that buffer for this draw vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &uniformBuffers[currentFrame].descriptorSet, 0, nullptr); // Bind the rendering pipeline // The pipeline (state object) contains all states of the rendering pipeline, binding it will set all the states specified at pipeline creation time @@ -990,7 +990,7 @@ public: // Bind triangle index buffer vkCmdBindIndexBuffer(commandBuffer, indices.buffer, 0, VK_INDEX_TYPE_UINT32); // Draw indexed triangle - vkCmdDrawIndexed(commandBuffer, indices.count, 1, 0, 0, 1); + vkCmdDrawIndexed(commandBuffer, indices.count, 1, 0, 0, 0); vkCmdEndRenderPass(commandBuffer); // Ending the render pass will add an implicit barrier transitioning the frame buffer color attachment to // VK_IMAGE_LAYOUT_PRESENT_SRC_KHR for presenting it to the windowing system diff --git a/examples/trianglevulkan13/trianglevulkan13.cpp b/examples/trianglevulkan13/trianglevulkan13.cpp index 0ba5b5a3..368ce9cc 100644 --- a/examples/trianglevulkan13/trianglevulkan13.cpp +++ b/examples/trianglevulkan13/trianglevulkan13.cpp @@ -740,7 +740,7 @@ public: // Update dynamic scissor state VkRect2D scissor{ 0, 0, width, height }; vkCmdSetScissor(commandBuffer, 0, 1, &scissor); - // Bind descriptor set for the currrent frame's uniform buffer, so the shader uses the data from that buffer for this draw + // Bind descriptor set for the current frame's uniform buffer, so the shader uses the data from that buffer for this draw vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &uniformBuffers[currentFrame].descriptorSet, 0, nullptr); // The pipeline (state object) contains all states of the rendering pipeline, binding it will set all the states specified at pipeline creation time vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); @@ -750,7 +750,7 @@ public: // Bind triangle index buffer vkCmdBindIndexBuffer(commandBuffer, indexBuffer.handle, 0, VK_INDEX_TYPE_UINT32); // Draw indexed triangle - vkCmdDrawIndexed(commandBuffer, indexCount, 1, 0, 0, 1); + vkCmdDrawIndexed(commandBuffer, indexCount, 1, 0, 0, 0); // Finish the current dynamic rendering section vkCmdEndRendering(commandBuffer);