diff options
Diffstat (limited to 'src/vk')
-rw-r--r-- | src/vk/device.cpp | 18 | ||||
-rw-r--r-- | src/vk/queue_family.cpp | 16 | ||||
-rw-r--r-- | src/vk/swapchain.cpp | 1 |
3 files changed, 21 insertions, 14 deletions
diff --git a/src/vk/device.cpp b/src/vk/device.cpp index 2434283..b4b47fb 100644 --- a/src/vk/device.cpp +++ b/src/vk/device.cpp @@ -17,9 +17,11 @@ #include "device.hpp" #include <fstream> -#include <iostream> #include <new> #include <vector> +#ifdef DEBUG +#include <sstream> +#endif #include "../core.hpp" @@ -86,15 +88,17 @@ Device::Device(VkPhysicalDevice vk_physical_device, bool with_swapchain) vkGetPhysicalDeviceFeatures(vk_physical_device, &supported_features); #ifdef DEBUG - std::cout << "Name: " << physical_properties.deviceName << std::endl; - std::cout << "API version: " << physical_properties.apiVersion << + std::stringstream message{}; + message << "Name: " << physical_properties.deviceName << std::endl; + message << "API version: " << physical_properties.apiVersion << std::endl; - std::cout << "Driver version: " << physical_properties.driverVersion << + message << "Driver version: " << physical_properties.driverVersion << std::endl; - std::cout << "Vendor ID: " << physical_properties.vendorID << std::endl; - std::cout << "Device ID: " << physical_properties.deviceID << std::endl; - std::cout << "Device type: " << physical_properties.deviceType << + message << "Vendor ID: " << physical_properties.vendorID << std::endl; + message << "Device ID: " << physical_properties.deviceID << std::endl; + message << "Device type: " << physical_properties.deviceType << std::endl; + cg_core.log.message(Log::Level::Trace, message.str()); #endif std::vector<VkDeviceQueueCreateInfo> device_queue_create_infos; diff --git a/src/vk/queue_family.cpp b/src/vk/queue_family.cpp index 7c91ba2..d917c13 100644 --- a/src/vk/queue_family.cpp +++ b/src/vk/queue_family.cpp @@ -16,7 +16,9 @@ #include "queue_family.hpp" -#include <iostream> +#ifdef DEBUG +#include <sstream> +#endif #include "../core.hpp" @@ -30,20 +32,22 @@ QueueFamily::QueueFamily( { #ifdef DEBUG - std::cout << "Queue quantity: " << queue_family_properties.queueCount << + std::stringstream message{}; + message << "Queue quantity: " << queue_family_properties.queueCount << std::endl; - std::cout << "Graphics: " << + message << "Graphics: " << (queue_family_properties.queueFlags & VK_QUEUE_GRAPHICS_BIT ? "true" : "false") << std::endl; - std::cout << "Compute: " << + message << "Compute: " << (queue_family_properties.queueFlags & VK_QUEUE_COMPUTE_BIT ? "true" : "false") << std::endl; - std::cout << "Transfer: " << + message << "Transfer: " << (queue_family_properties.queueFlags & VK_QUEUE_TRANSFER_BIT ? "true" : "false") << std::endl; - std::cout << "Sparse Binding: " << + message << "Sparse Binding: " << (queue_family_properties.queueFlags & VK_QUEUE_SPARSE_BINDING_BIT ? "true" : "false") << std::endl; + cg_core.log.message(Log::Level::Trace, message.str()); #endif this->device = device; diff --git a/src/vk/swapchain.cpp b/src/vk/swapchain.cpp index 3b26b00..678279e 100644 --- a/src/vk/swapchain.cpp +++ b/src/vk/swapchain.cpp @@ -19,7 +19,6 @@ #include "../core.hpp" #include <vector> -#include <iostream> namespace { |