Refactor the CMakeLists for all the samples; use vulkan.hpp/vulkan_raii.hpp as precompiled header.
This commit is contained in:
@@ -15,9 +15,8 @@
|
||||
// VulkanHpp Samples : 01_InitInstance
|
||||
// Create and destroy a vk::Instance
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
static std::string AppName = "01_InitInstance";
|
||||
static std::string EngineName = "Vulkan.hpp";
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(01_InitInstance)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
01_InitInstance.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(01_InitInstance
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(01_InitInstance PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME 01_InitInstance )
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#endif
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(02_EnumerateDevices)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
02_EnumerateDevices.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(02_EnumerateDevices
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(02_EnumerateDevices PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(02_EnumerateDevices PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 02_EnumerateDevices )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Create and destroy a device
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(03_InitDevice)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
03_InitDevice.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(03_InitDevice
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(03_InitDevice PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(03_InitDevice PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 03_InitDevice )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Create command buffer
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(04_InitCommandBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
04_InitCommandBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(04_InitCommandBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(04_InitCommandBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(04_InitCommandBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 04_InitCommandBuffer )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Initialize a swapchain
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -52,8 +51,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
// determine a queueFamilyIndex that suports present
|
||||
// first check if the graphicsQueueFamiliyIndex is good enough
|
||||
size_t presentQueueFamilyIndex = physicalDevice.getSurfaceSupportKHR( static_cast<uint32_t>( graphicsQueueFamilyIndex ), surface )
|
||||
? graphicsQueueFamilyIndex
|
||||
: queueFamilyProperties.size();
|
||||
? graphicsQueueFamilyIndex
|
||||
: queueFamilyProperties.size();
|
||||
if ( presentQueueFamilyIndex == queueFamilyProperties.size() )
|
||||
{
|
||||
// the graphicsQueueFamilyIndex doesn't support present -> look for an other family index that supports both
|
||||
@@ -113,8 +112,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
vk::PresentModeKHR swapchainPresentMode = vk::PresentModeKHR::eFifo;
|
||||
|
||||
vk::SurfaceTransformFlagBitsKHR preTransform = ( surfaceCapabilities.supportedTransforms & vk::SurfaceTransformFlagBitsKHR::eIdentity )
|
||||
? vk::SurfaceTransformFlagBitsKHR::eIdentity
|
||||
: surfaceCapabilities.currentTransform;
|
||||
? vk::SurfaceTransformFlagBitsKHR::eIdentity
|
||||
: surfaceCapabilities.currentTransform;
|
||||
|
||||
vk::CompositeAlphaFlagBitsKHR compositeAlpha =
|
||||
( surfaceCapabilities.supportedCompositeAlpha & vk::CompositeAlphaFlagBitsKHR::ePreMultiplied ) ? vk::CompositeAlphaFlagBitsKHR::ePreMultiplied
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(05_InitSwapchain)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
05_InitSwapchain.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(05_InitSwapchain
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(05_InitSwapchain PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(05_InitSwapchain PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 05_InitSwapchain )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Initialize a depth buffer
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(06_InitDepthBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
06_InitDepthBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(06_InitDepthBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(06_InitDepthBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(06_InitDepthBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 06_InitDepthBuffer )
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#endif
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(07_InitUniformBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
07_InitUniformBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(07_InitUniformBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(07_InitUniformBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(07_InitUniformBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 07_InitUniformBuffer )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Initialize a descriptor and pipeline layout
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(08_InitPipelineLayout)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
08_InitPipelineLayout.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(08_InitPipelineLayout
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(08_InitPipelineLayout PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(08_InitPipelineLayout PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 08_InitPipelineLayout )
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(09_InitDescriptorSet)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
09_InitDescriptorSet.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(09_InitDescriptorSet
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(09_InitDescriptorSet PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(09_InitDescriptorSet PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 09_InitDescriptorSet )
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#endif
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(10_InitRenderPass)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
10_InitRenderPass.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(10_InitRenderPass
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(10_InitRenderPass PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(10_InitRenderPass PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 10_InitRenderPass )
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(11_InitShaders)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
11_InitShaders.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(11_InitShaders
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(11_InitShaders PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(11_InitShaders PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 11_InitShaders )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Initialize framebuffers
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(12_InitFrameBuffers)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
12_InitFrameBuffers.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(12_InitFrameBuffers
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(12_InitFrameBuffers PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(12_InitFrameBuffers PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 12_InitFrameBuffers )
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "../utils/geometries.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(13_InitVertexBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
13_InitVertexBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(13_InitVertexBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(13_InitVertexBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(13_InitVertexBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 13_InitVertexBuffer )
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(14_InitPipeline)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
14_InitPipeline.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(14_InitPipeline
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(14_InitPipeline PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(14_InitPipeline PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 14_InitPipeline )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(15_DrawCube)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
15_DrawCube.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(15_DrawCube
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(15_DrawCube PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(15_DrawCube PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 15_DrawCube )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Determine if the current system can use Vulkan 1.1 API features
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
static char const * AppName = "16_Vulkan_1_1";
|
||||
static char const * EngineName = "Vulkan.hpp";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(16_Vulkan_1_1)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
16_Vulkan_1_1.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(16_Vulkan_1_1
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(16_Vulkan_1_1 PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(16_Vulkan_1_1 PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME 16_Vulkan_1_1 )
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(CopyBlitImage)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
CopyBlitImage.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(CopyBlitImage
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(CopyBlitImage PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(CopyBlitImage PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME CopyBlitImage )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Draw a cube
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <thread>
|
||||
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(CreateDebugUtilsMessenger)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
CreateDebugUtilsMessenger.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(CreateDebugUtilsMessenger
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(CreateDebugUtilsMessenger PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger )
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(DebugUtilsObjectName)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
DebugUtilsObjectName.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(DebugUtilsObjectName
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(DebugUtilsObjectName PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(DebugUtilsObjectName PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME DebugUtilsObjectName )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Demonstrate usage of DebugUtilsObjectName
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
static char const * AppName = "DebugUtilsObjectName";
|
||||
static char const * EngineName = "Vulkan.hpp";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(DrawTexturedCube)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
DrawTexturedCube.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(DrawTexturedCube
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(DrawTexturedCube PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(DrawTexturedCube PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME DrawTexturedCube )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(DynamicUniform)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
DynamicUniform.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(DynamicUniform
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(DynamicUniform PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(DynamicUniform PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME DynamicUniform )
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
# pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(EnableValidationWithCallback)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
EnableValidationWithCallback.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(EnableValidationWithCallback
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(EnableValidationWithCallback PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(EnableValidationWithCallback PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME EnableValidationWithCallback )
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "EnableValidationWithCallback";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(EnumerateDevicesAdvanced)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
EnumerateDevicesAdvanced.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(EnumerateDevicesAdvanced
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(EnumerateDevicesAdvanced PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(EnumerateDevicesAdvanced PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME EnumerateDevicesAdvanced )
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "EnumerateDevicesAdvanced";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(Events)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
Events.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(Events
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(Events PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(Events PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME Events )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Use basic events
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(ImmutableSampler)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
ImmutableSampler.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(ImmutableSampler
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(ImmutableSampler PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(ImmutableSampler PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME ImmutableSampler )
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(InitTexture)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InitTexture.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InitTexture
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InitTexture PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InitTexture PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME InitTexture )
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(InputAttachment)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InputAttachment.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InputAttachment
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InputAttachment PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InputAttachment PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME InputAttachment )
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(InstanceExtensionProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InstanceExtensionProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InstanceExtensionProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceExtensionProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties )
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
// Get global extension properties to know what extension are available to enable at CreateInstance
|
||||
// time.
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(InstanceLayerExtensionProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InstanceLayerExtensionProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InstanceLayerExtensionProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceLayerExtensionProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties )
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
// VulkanHpp Samples : InstanceLayerExtensionProperties
|
||||
// Get list of global layers and their associated extensions, if any.
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
struct PropertyData
|
||||
{
|
||||
PropertyData( vk::LayerProperties const & layerProperties_, std::vector<vk::ExtensionProperties> const & extensionProperties_ )
|
||||
: layerProperties( layerProperties_ ), extensionProperties( extensionProperties_ )
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
vk::LayerProperties layerProperties;
|
||||
std::vector<vk::ExtensionProperties> extensionProperties;
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(InstanceLayerProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InstanceLayerProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InstanceLayerProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceLayerProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties )
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
// VulkanHpp Samples : InstanceLayerProperties
|
||||
// Get global layer properties to know what layers are available to enable at CreateInstance time.
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
|
||||
@@ -14,26 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
|
||||
project(InstanceVersion)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
InstanceVersion.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(InstanceVersion
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceVersion PRIVATE utils)
|
||||
|
||||
endif()
|
||||
vulkan_hpp__setup_sample_static( NAME InstanceVersion )
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
// VulkanHpp Samples : InstanceVersion
|
||||
// Get the version of instance-level functionality supported by the implementation.
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
std::string decodeAPIVersion( uint32_t apiVersion )
|
||||
{
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(MultipleSets)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
MultipleSets.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(MultipleSets
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(MultipleSets PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(MultipleSets PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME MultipleSets )
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(OcclusionQuery)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
OcclusionQuery.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(OcclusionQuery
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(OcclusionQuery PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(OcclusionQuery PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME OcclusionQuery )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceExtensions)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceExtensions.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceExtensions
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceExtensions PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceExtensions PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceExtensions )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Get extension properties per physical device.
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceFeatures)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceFeatures.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceFeatures
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceFeatures PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceFeatures PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceFeatures )
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#endif
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceGroups)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceGroups.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceGroups
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceGroups PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceGroups PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceGroups )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// Get the PhysicalDeviceGroups.
|
||||
|
||||
#include "../utils/utils.hpp"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceMemoryProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceMemoryProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceMemoryProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceMemoryProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceMemoryProperties PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceMemoryProperties )
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "PhysicalDeviceMemoryProperties";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceProperties PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceProperties )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "PhysicalDeviceProperties";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PhysicalDeviceQueueFamilyProperties)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PhysicalDeviceQueueFamilyProperties.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PhysicalDeviceQueueFamilyProperties
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PhysicalDeviceQueueFamilyProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PhysicalDeviceQueueFamilyProperties PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceQueueFamilyProperties )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "PhysicalDeviceQueueFamilyProperties";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PipelineCache)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PipelineCache.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PipelineCache
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PipelineCache PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PipelineCache PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PipelineCache )
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#else
|
||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include "../utils/geometries.hpp"
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PipelineDerivative)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PipelineDerivative.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PipelineDerivative
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PipelineDerivative PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PipelineDerivative PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PipelineDerivative )
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <thread>
|
||||
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PushConstants)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PushConstants.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PushConstants
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PushConstants PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PushConstants PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PushConstants )
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#else
|
||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include "../utils/geometries.hpp"
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(PushDescriptors)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
PushDescriptors.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(PushDescriptors
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(PushDescriptors PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(PushDescriptors PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME PushDescriptors )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,30 +14,15 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(RayTracing)
|
||||
|
||||
set(HEADERS
|
||||
CameraManipulator.hpp
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
CameraManipulator.cpp
|
||||
RayTracing.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(RayTracing
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(RayTracing PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(RayTracing PRIVATE utils)
|
||||
target_include_directories(RayTracing PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/samples/RayTracing/common
|
||||
${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv
|
||||
${CMAKE_SOURCE_DIR}/stb
|
||||
${CMAKE_SOURCE_DIR}/tinyobjloader
|
||||
)
|
||||
vulkan_hpp__setup_sample_dynamic(
|
||||
NAME RayTracing
|
||||
INCLUDE_DIRS
|
||||
${CMAKE_SOURCE_DIR}/samples/RayTracing/common
|
||||
${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv
|
||||
${CMAKE_SOURCE_DIR}/stb
|
||||
${CMAKE_SOURCE_DIR}/tinyobjloader
|
||||
HEADERS
|
||||
CameraManipulator.hpp
|
||||
SOURCES
|
||||
CameraManipulator.cpp
|
||||
RayTracing.cpp)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
// we need to include vulkan.hpp before glfw3.h, so stop clang-format to reorder them
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
// clang-format off
|
||||
#include <GLFW/glfw3.h>
|
||||
// clang-format on
|
||||
#include <numeric>
|
||||
@@ -700,7 +700,25 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
vk::DebugUtilsMessengerEXT debugUtilsMessenger = instance.createDebugUtilsMessengerEXT( vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
|
||||
vk::PhysicalDevice physicalDevice = instance.enumeratePhysicalDevices().front();
|
||||
vk::PhysicalDevice physicalDevice = nullptr;
|
||||
std::vector<vk::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices();
|
||||
for ( auto pd : physicalDevices )
|
||||
{
|
||||
std::vector<vk::ExtensionProperties> ep = pd.enumerateDeviceExtensionProperties();
|
||||
if ( std::find_if( ep.cbegin(),
|
||||
ep.cend(),
|
||||
[]( vk::ExtensionProperties const & prop )
|
||||
{ return strcmp( prop.extensionName, VK_NV_RAY_TRACING_EXTENSION_NAME ) == 0; } ) != ep.cend() )
|
||||
{
|
||||
physicalDevice = pd;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !physicalDevice )
|
||||
{
|
||||
std::cerr << AppName << ": can't find a PhysicalDevice supporting extension <" << VK_NV_RAY_TRACING_EXTENSION_NAME << ">" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Create Window Surface (using glfw)
|
||||
vk::SurfaceKHR surface;
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(SecondaryCommandBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
SecondaryCommandBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(SecondaryCommandBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(SecondaryCommandBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(SecondaryCommandBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME SecondaryCommandBuffer )
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(SeparateImageSampler)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
SeparateImageSampler.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(SeparateImageSampler
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(SeparateImageSampler PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(SeparateImageSampler PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME SeparateImageSampler )
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,26 +14,9 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(SurfaceCapabilities)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
SurfaceCapabilities.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
# Win32 exclusive vk::SurfaceCapabilitiesFullScreenExclusiveEXT is used
|
||||
if(WIN32)
|
||||
|
||||
add_executable(SurfaceCapabilities
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
set_target_properties(SurfaceCapabilities PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(SurfaceCapabilities PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME SurfaceCapabilities )
|
||||
|
||||
endif()
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "SurfaceCapabilities";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(SurfaceFormats)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
SurfaceFormats.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(SurfaceFormats
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(SurfaceFormats PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(SurfaceFormats PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME SurfaceFormats )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
static char const * AppName = "SurfaceFormats";
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(Template)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
Template.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(Template
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(Template PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(Template PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME Template )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -14,22 +14,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(TexelBuffer)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
TexelBuffer.cpp
|
||||
)
|
||||
|
||||
source_group(headers FILES ${HEADERS})
|
||||
source_group(sources FILES ${SOURCES})
|
||||
|
||||
add_executable(TexelBuffer
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties(TexelBuffer PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(TexelBuffer PRIVATE utils)
|
||||
vulkan_hpp__setup_sample_dynamic( NAME TexelBuffer )
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -47,3 +47,4 @@ target_link_libraries(utils PUBLIC glslang-default-resource-limits)
|
||||
target_link_libraries(utils PUBLIC SPIRV)
|
||||
target_compile_definitions(utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)
|
||||
|
||||
target_precompile_headers(utils PRIVATE <vulkan/vulkan.hpp>)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user