From e3f0db2d738956d6d107574c47cbfea8eff9841d Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Fri, 19 Jul 2024 02:17:27 +0200
Subject: [PATCH] Recorrect feature requirements in projects

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 projects/fire_works/src/main.cpp          | 8 --------
 projects/indirect_dispatch/src/App.cpp    | 8 --------
 projects/mesh_shader/src/main.cpp         | 8 --------
 projects/particle_simulation/src/main.cpp | 7 -------
 projects/path_tracer/src/main.cpp         | 8 --------
 projects/ray_tracer/src/main.cpp          | 8 --------
 projects/sph/src/main.cpp                 | 8 --------
 src/vkcv/ShaderProgram.cpp                | 1 -
 8 files changed, 56 deletions(-)

diff --git a/projects/fire_works/src/main.cpp b/projects/fire_works/src/main.cpp
index 7c703495..ef1a66bf 100644
--- a/projects/fire_works/src/main.cpp
+++ b/projects/fire_works/src/main.cpp
@@ -201,14 +201,6 @@ int main(int argc, const char **argv) {
 	features.requireFeature([](vk::PhysicalDeviceFeatures& features) {
 		features.setGeometryShader(true);
 	});
-
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
 	
 	vkcv::Core core = vkcv::Core::create(
 		"Firework",
diff --git a/projects/indirect_dispatch/src/App.cpp b/projects/indirect_dispatch/src/App.cpp
index 7e29ea33..1c42cafc 100644
--- a/projects/indirect_dispatch/src/App.cpp
+++ b/projects/indirect_dispatch/src/App.cpp
@@ -48,14 +48,6 @@ static vkcv::Features getAppFeatures() {
 				features.setShaderFloat16(true);
 			}
 	);
-
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
 	
 	features.tryExtensionFeature<vk::PhysicalDeviceCoherentMemoryFeaturesAMD>(
 			VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME,
diff --git a/projects/mesh_shader/src/main.cpp b/projects/mesh_shader/src/main.cpp
index 998162be..72b15e31 100644
--- a/projects/mesh_shader/src/main.cpp
+++ b/projects/mesh_shader/src/main.cpp
@@ -90,14 +90,6 @@ int main(int argc, const char** argv) {
 			}
 	);
 
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
-
 	vkcv::Core core = vkcv::Core::create(
 		applicationName,
 		VK_MAKE_VERSION(0, 0, 1),
diff --git a/projects/particle_simulation/src/main.cpp b/projects/particle_simulation/src/main.cpp
index af291257..3411cdf6 100644
--- a/projects/particle_simulation/src/main.cpp
+++ b/projects/particle_simulation/src/main.cpp
@@ -19,13 +19,6 @@ int main(int argc, const char **argv) {
 
     vkcv::Features features;
 	features.requireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
-    features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
 	
     vkcv::Core core = vkcv::Core::create(
             applicationName,
diff --git a/projects/path_tracer/src/main.cpp b/projects/path_tracer/src/main.cpp
index 8e37e6af..21d83a68 100644
--- a/projects/path_tracer/src/main.cpp
+++ b/projects/path_tracer/src/main.cpp
@@ -50,14 +50,6 @@ int main(int argc, const char** argv) {
 	vkcv::Features features;
 	features.requireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
 
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
-
 	vkcv::Core core = vkcv::Core::create(
 		applicationName,
 		VK_MAKE_VERSION(0, 0, 1),
diff --git a/projects/ray_tracer/src/main.cpp b/projects/ray_tracer/src/main.cpp
index 838fd154..a920c3a5 100644
--- a/projects/ray_tracer/src/main.cpp
+++ b/projects/ray_tracer/src/main.cpp
@@ -38,14 +38,6 @@ int main(int argc, const char** argv) {
 	vkcv::Features features;
 	features.requireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
 
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
-
 	vkcv::Core core = vkcv::Core::create(
 		applicationName,
 		VK_MAKE_VERSION(0, 0, 1),
diff --git a/projects/sph/src/main.cpp b/projects/sph/src/main.cpp
index b24ad385..ac022780 100644
--- a/projects/sph/src/main.cpp
+++ b/projects/sph/src/main.cpp
@@ -19,14 +19,6 @@ int main(int argc, const char **argv) {
     vkcv::Features features;
 	features.requireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
 
-	features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>(
-			VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
-			[](vk::PhysicalDeviceDescriptorIndexingFeatures& features) {
-				features.setDescriptorBindingPartiallyBound(true);
-				features.setDescriptorBindingVariableDescriptorCount(true);
-			}
-	);
-
     // creating core object that will handle all vulkan objects
     vkcv::Core core = vkcv::Core::create(
         applicationName,
diff --git a/src/vkcv/ShaderProgram.cpp b/src/vkcv/ShaderProgram.cpp
index 4a62dec4..bc478788 100644
--- a/src/vkcv/ShaderProgram.cpp
+++ b/src/vkcv/ShaderProgram.cpp
@@ -125,7 +125,6 @@ namespace vkcv {
 		for (uint32_t i = 0; i < res->size(); i++) {
 			const spirv_cross::Resource &u = (*res)[i];
 			const spirv_cross::SPIRType &base_type = comp.get_type(u.base_type_id);
-			const spirv_cross::SPIRType &type = comp.get_type(u.type_id);
 
 			uint32_t setID = comp.get_decoration(u.id, spv::DecorationDescriptorSet);
 			uint32_t bindingID = comp.get_decoration(u.id, spv::DecorationBinding);
-- 
GitLab