From dd240099913d402fede9b72e6988bec2da05c94d Mon Sep 17 00:00:00 2001
From: Sascha Willems <webmaster@saschawillems.de>
Date: Tue, 9 Nov 2021 21:44:43 +0100
Subject: [PATCH] Remove unused push constants

Fies #901
---
 .../computeparticles/computeparticles.cpp     | 20 +------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/examples/computeparticles/computeparticles.cpp b/examples/computeparticles/computeparticles.cpp
index 46bb3ca7..48bfe07e 100644
--- a/examples/computeparticles/computeparticles.cpp
+++ b/examples/computeparticles/computeparticles.cpp
@@ -3,7 +3,7 @@
 *
 * Updated compute shader by Lukas Bergdoll (https://github.com/Voultapher)
 *
-* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de
+* Copyright (C) 2016-2021 by Sascha Willems - www.saschawillems.de
 *
 * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 */
@@ -168,15 +168,6 @@ public:
 			vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, graphics.pipeline);
 			vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, graphics.pipelineLayout, 0, 1, &graphics.descriptorSet, 0, NULL);
 
-			glm::vec2 screendim = glm::vec2((float)width, (float)height);
-			vkCmdPushConstants(
-					drawCmdBuffers[i],
-					graphics.pipelineLayout,
-					VK_SHADER_STAGE_VERTEX_BIT,
-					0,
-					sizeof(glm::vec2),
-					&screendim);
-
 			VkDeviceSize offsets[1] = { 0 };
 			vkCmdBindVertexBuffers(drawCmdBuffers[i], VERTEX_BUFFER_BIND_ID, 1, &compute.storageBuffer.buffer, offsets);
 			vkCmdDraw(drawCmdBuffers[i], PARTICLE_COUNT, 1, 0, 0);
@@ -432,15 +423,6 @@ public:
 				&graphics.descriptorSetLayout,
 				1);
 
-		VkPushConstantRange pushConstantRange =
-			vks::initializers::pushConstantRange(
-				VK_SHADER_STAGE_VERTEX_BIT,
-				sizeof(glm::vec2),
-				0);
-
-		pipelineLayoutCreateInfo.pushConstantRangeCount = 1;
-		pipelineLayoutCreateInfo.pPushConstantRanges = &pushConstantRange;
-
 		VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &graphics.pipelineLayout));
 	}
 
-- 
GitLab