diff --git a/examples/bloom/bloom.cpp b/examples/bloom/bloom.cpp index 08d1fd34..2b19f0fc 100644 --- a/examples/bloom/bloom.cpp +++ b/examples/bloom/bloom.cpp @@ -424,14 +424,11 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // Skybox vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.scene, 0, 1, &descriptorSets.skyBox, 0, NULL); vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.skyBox); models.skyBox.draw(drawCmdBuffers[i]); - // 3D scene vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.scene, 0, 1, &descriptorSets.scene, 0, NULL); vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.phongPass); diff --git a/examples/debugmarker/debugmarker.cpp b/examples/debugmarker/debugmarker.cpp index 8b7c7348..fa1ee20f 100644 --- a/examples/debugmarker/debugmarker.cpp +++ b/examples/debugmarker/debugmarker.cpp @@ -147,7 +147,6 @@ struct Scene { void draw(VkCommandBuffer cmdBuffer) { - VkDeviceSize offsets[1] = { 0 }; model.bindBuffers(cmdBuffer); for (auto i = 0; i < model.nodes.size(); i++) { @@ -458,7 +457,6 @@ public: VkClearValue clearValues[2]; VkViewport viewport; VkRect2D scissor; - VkDeviceSize offsets[1] = { 0 }; for (int32_t i = 0; i < drawCmdBuffers.size(); ++i) { diff --git a/examples/deferredmultisampling/deferredmultisampling.cpp b/examples/deferredmultisampling/deferredmultisampling.cpp index 0b6f6805..16ba69ed 100644 --- a/examples/deferredmultisampling/deferredmultisampling.cpp +++ b/examples/deferredmultisampling/deferredmultisampling.cpp @@ -236,8 +236,6 @@ public: vkCmdBindPipeline(offScreenCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, useSampleShading ? pipelines.offscreenSampleShading : pipelines.offscreen); - VkDeviceSize offsets[1] = { 0 }; - // Background vkCmdBindDescriptorSets(offScreenCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSets.background, 0, nullptr); models.background.draw(offScreenCmdBuffer); diff --git a/examples/deferredshadows/deferredshadows.cpp b/examples/deferredshadows/deferredshadows.cpp index ac7a017b..5cd24caa 100644 --- a/examples/deferredshadows/deferredshadows.cpp +++ b/examples/deferredshadows/deferredshadows.cpp @@ -289,8 +289,6 @@ public: // Put render commands for the scene into the given command buffer void renderScene(VkCommandBuffer cmdBuffer, bool shadow) { - VkDeviceSize offsets[1] = { 0 }; - // Background vkCmdBindDescriptorSets(cmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, shadow ? &descriptorSets.shadow : &descriptorSets.background, 0, NULL); models.background.draw(cmdBuffer); @@ -426,7 +424,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, nullptr); // Final composition as full screen quad diff --git a/examples/descriptorsets/descriptorsets.cpp b/examples/descriptorsets/descriptorsets.cpp index b3955c82..a5389937 100644 --- a/examples/descriptorsets/descriptorsets.cpp +++ b/examples/descriptorsets/descriptorsets.cpp @@ -97,7 +97,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; model.bindBuffers(drawCmdBuffers[i]); /* diff --git a/examples/geometryshader/geometryshader.cpp b/examples/geometryshader/geometryshader.cpp index 5fe9e4a3..917c80bf 100644 --- a/examples/geometryshader/geometryshader.cpp +++ b/examples/geometryshader/geometryshader.cpp @@ -116,8 +116,6 @@ public: vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, NULL); - VkDeviceSize offsets[1] = { 0 }; - // Solid shading vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.solid); scene.draw(drawCmdBuffers[i]); diff --git a/examples/inlineuniformblocks/inlineuniformblocks.cpp b/examples/inlineuniformblocks/inlineuniformblocks.cpp index 04b11bf7..d09cfc03 100644 --- a/examples/inlineuniformblocks/inlineuniformblocks.cpp +++ b/examples/inlineuniformblocks/inlineuniformblocks.cpp @@ -125,8 +125,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // Render objects vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); diff --git a/examples/inputattachments/inputattachments.cpp b/examples/inputattachments/inputattachments.cpp index 3fd2c828..c0fb4408 100644 --- a/examples/inputattachments/inputattachments.cpp +++ b/examples/inputattachments/inputattachments.cpp @@ -374,8 +374,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - /* First sub pass Fills the attachments diff --git a/examples/meshshader/meshshader.cpp b/examples/meshshader/meshshader.cpp index 8bd1b105..00b2109e 100644 --- a/examples/meshshader/meshshader.cpp +++ b/examples/meshshader/meshshader.cpp @@ -102,8 +102,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, NULL); vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); diff --git a/examples/occlusionquery/occlusionquery.cpp b/examples/occlusionquery/occlusionquery.cpp index 9db43e6d..f0e6c9e8 100644 --- a/examples/occlusionquery/occlusionquery.cpp +++ b/examples/occlusionquery/occlusionquery.cpp @@ -159,8 +159,6 @@ public: 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - glm::mat4 modelMatrix = glm::mat4(1.0f); // Occlusion pass diff --git a/examples/pbrbasic/pbrbasic.cpp b/examples/pbrbasic/pbrbasic.cpp index 8eb6a176..05e0ed06 100644 --- a/examples/pbrbasic/pbrbasic.cpp +++ b/examples/pbrbasic/pbrbasic.cpp @@ -147,8 +147,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // Objects vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, NULL); diff --git a/examples/radialblur/radialblur.cpp b/examples/radialblur/radialblur.cpp index 9b54883e..91b86e55 100644 --- a/examples/radialblur/radialblur.cpp +++ b/examples/radialblur/radialblur.cpp @@ -307,7 +307,6 @@ public: VkClearValue clearValues[2]; VkViewport viewport; VkRect2D scissor; - VkDeviceSize offsets[1] = { 0 }; for (int32_t i = 0; i < drawCmdBuffers.size(); ++i) { diff --git a/examples/shadowmappingcascade/shadowmappingcascade.cpp b/examples/shadowmappingcascade/shadowmappingcascade.cpp index b1ff72ca..f47e1f30 100644 --- a/examples/shadowmappingcascade/shadowmappingcascade.cpp +++ b/examples/shadowmappingcascade/shadowmappingcascade.cpp @@ -344,12 +344,11 @@ public: sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; VK_CHECK_RESULT(vkCreateSampler(device, &sampler, nullptr, &depth.sampler)); } + void buildCommandBuffers() { VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo(); - VkDeviceSize offsets[1] = { 0 }; - for (int32_t i = 0; i < drawCmdBuffers.size(); i++) { VK_CHECK_RESULT(vkBeginCommandBuffer(drawCmdBuffers[i], &cmdBufInfo)); diff --git a/examples/shadowmappingomni/shadowmappingomni.cpp b/examples/shadowmappingomni/shadowmappingomni.cpp index 3835ac01..d66a6f90 100644 --- a/examples/shadowmappingomni/shadowmappingomni.cpp +++ b/examples/shadowmappingomni/shadowmappingomni.cpp @@ -516,8 +516,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.scene, 0, 1, &descriptorSets.scene, 0, NULL); if (displayCubeMap) diff --git a/examples/specializationconstants/specializationconstants.cpp b/examples/specializationconstants/specializationconstants.cpp index c32aef09..e8442517 100644 --- a/examples/specializationconstants/specializationconstants.cpp +++ b/examples/specializationconstants/specializationconstants.cpp @@ -95,8 +95,6 @@ public: vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, NULL); - VkDeviceSize offsets[1] = { 0 }; - // Left VkViewport viewport = vks::initializers::viewport((float) width / 3.0f, (float) height, 0.0f, 1.0f); vkCmdSetViewport(drawCmdBuffers[i], 0, 1, &viewport); diff --git a/examples/ssao/ssao.cpp b/examples/ssao/ssao.cpp index 3992c4e3..abcde467 100644 --- a/examples/ssao/ssao.cpp +++ b/examples/ssao/ssao.cpp @@ -494,8 +494,6 @@ public: { VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo(); - VkDeviceSize offsets[1] = { 0 }; - for (int32_t i = 0; i < drawCmdBuffers.size(); ++i) { VK_CHECK_RESULT(vkBeginCommandBuffer(drawCmdBuffers[i], &cmdBufInfo)); diff --git a/examples/subpasses/subpasses.cpp b/examples/subpasses/subpasses.cpp index 9f59df3c..91d927c2 100644 --- a/examples/subpasses/subpasses.cpp +++ b/examples/subpasses/subpasses.cpp @@ -462,8 +462,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // First sub pass // Renders the components of the scene to the G-Buffer attachments { diff --git a/examples/texturecubemap/texturecubemap.cpp b/examples/texturecubemap/texturecubemap.cpp index 33358541..d41f3b2e 100644 --- a/examples/texturecubemap/texturecubemap.cpp +++ b/examples/texturecubemap/texturecubemap.cpp @@ -318,8 +318,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // Skybox if (displaySkybox) { diff --git a/examples/texturecubemaparray/texturecubemaparray.cpp b/examples/texturecubemaparray/texturecubemaparray.cpp index 6e649d82..2359769f 100644 --- a/examples/texturecubemaparray/texturecubemaparray.cpp +++ b/examples/texturecubemaparray/texturecubemaparray.cpp @@ -323,8 +323,6 @@ public: VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0); vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); - VkDeviceSize offsets[1] = { 0 }; - // Skybox if (displaySkybox) {