diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b5f5ca..8a14a24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.6.0) -set(infoware_version "0.6.0") # also update in src/gpu/vulkan.cpp +set(infoware_version "0.6.0") project(infoware VERSION "${infoware_version}" LANGUAGES CXX) diff --git a/src/gpu/vulkan.cpp b/src/gpu/vulkan.cpp index 45ad9a1..bae6a6d 100644 --- a/src/gpu/vulkan.cpp +++ b/src/gpu/vulkan.cpp @@ -13,17 +13,8 @@ std::vector iware::gpu::device_properties() { - VkApplicationInfo appInfo{}; - appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; - appInfo.pApplicationName = "infoware"; - appInfo.applicationVersion = VK_MAKE_VERSION(0, 6, 0); - appInfo.pEngineName = "No Engine"; - appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); - appInfo.apiVersion = VK_API_VERSION_1_0; - VkInstanceCreateInfo createInfo{}; - createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - createInfo.pApplicationInfo = &appInfo; + createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; VkInstance instance; VkResult result = vkCreateInstance(&createInfo, nullptr, &instance); @@ -43,6 +34,7 @@ std::vector iware::gpu::device_properties() { devices.resize(devices_len); std::vector ret; + ret.reserve(devices.size()); for(auto&& device : devices) { VkPhysicalDeviceProperties props{}; vkGetPhysicalDeviceProperties(device, &props); @@ -53,7 +45,7 @@ std::vector iware::gpu::device_properties() { // None of the s match anything in our enum. auto vendor = vendor_t::unknown; switch(props.vendorID) { - case 0x8086: // Intel Corporation + case 0x8086: // Intel Corporation vendor = vendor_t::intel; break; case 0x1002: // Advanced Micro Devices, Inc. [AMD/ATI] @@ -64,16 +56,16 @@ std::vector iware::gpu::device_properties() { case 0x12d2: // NVidia / SGS Thomson (Joint Venture) vendor = vendor_t::nvidia; break; - case 0x1414: // Microsoft Corporation + case 0x1414: // Microsoft Corporation vendor = vendor_t::microsoft; break; - case 0x168c: // Qualcomm Atheros - case 0x17cb: // Qualcomm - case 0x1969: // Qualcomm Atheros - case 0x5143: // Qualcomm Inc + case 0x168c: // Qualcomm Atheros + case 0x17cb: // Qualcomm + case 0x1969: // Qualcomm Atheros + case 0x5143: // Qualcomm Inc vendor = vendor_t::qualcomm; break; - case 0x106b: // Apple Inc. + case 0x106b: // Apple Inc. vendor = vendor_t::apple; break; }