diff options
| -rw-r--r-- | src/device_context.cc | 10 | ||||
| -rw-r--r-- | src/device_context.hh | 5 | ||||
| -rw-r--r-- | src/layer.cc | 6 | ||||
| -rw-r--r-- | src/queue_context.hh | 1 |
4 files changed, 9 insertions, 13 deletions
diff --git a/src/device_context.cc b/src/device_context.cc index 59d818e..2c57b7e 100644 --- a/src/device_context.cc +++ b/src/device_context.cc @@ -1,18 +1,17 @@ #include "device_context.hh" #include "queue_context.hh" -#include <utility> #include <iostream> +#include <utility> namespace low_latency { DeviceContext::DeviceContext(InstanceContext& parent_instance, PhysicalDeviceContext& parent_physical_device, const VkDevice& device, - const PFN_vkSetDeviceLoaderData& sdld, VkuDeviceDispatchTable&& vtable) : instance(parent_instance), physical_device(parent_physical_device), - device(device), sdld(sdld), vtable(std::move(vtable)), clock(*this) {} + device(device), vtable(std::move(vtable)), clock(*this) {} DeviceContext::~DeviceContext() { // We will let the destructor handle clearing here, but they should be @@ -25,8 +24,9 @@ DeviceContext::~DeviceContext() { void DeviceContext::notify_acquire(const VkSwapchainKHR& swapchain, const std::uint32_t& image_index, const VkSemaphore& signal_semaphore) { - - std::cerr << "notify acquire for swapchain: " << swapchain << " : " << image_index << '\n'; + + std::cerr << "notify acquire for swapchain: " << swapchain << " : " + << image_index << '\n'; std::cerr << " signal semaphore: " << signal_semaphore << '\n'; const auto it = this->swapchain_signals.try_emplace(swapchain).first; diff --git a/src/device_context.hh b/src/device_context.hh index 8a86cfb..9edda61 100644 --- a/src/device_context.hh +++ b/src/device_context.hh @@ -25,8 +25,6 @@ struct DeviceContext final : public Context { const VkDevice device; const VkuDeviceDispatchTable vtable; - // Do we need to use this unless we wrap dispatchable objects? - const PFN_vkSetDeviceLoaderData sdld; std::unordered_map<VkQueue, std::shared_ptr<QueueContext>> queues; @@ -60,8 +58,7 @@ struct DeviceContext final : public Context { public: DeviceContext(InstanceContext& parent_instance, PhysicalDeviceContext& parent_physical, - const VkDevice& device, const PFN_vkSetDeviceLoaderData& sdld, - VkuDeviceDispatchTable&& vtable); + const VkDevice& device, VkuDeviceDispatchTable&& vtable); virtual ~DeviceContext(); public: diff --git a/src/layer.cc b/src/layer.cc index 98b5240..24ee72e 100644 --- a/src/layer.cc +++ b/src/layer.cc @@ -4,7 +4,6 @@ #include <memory> #include <span> #include <string_view> -#include <thread> #include <unordered_map> #include <utility> #include <vector> @@ -179,10 +178,9 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( return VK_ERROR_INITIALIZATION_FAILED; } - const auto sdld = callback_info->u.pfnSetDeviceLoaderData; const auto gipa = create_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; const auto gdpa = create_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; - if (!sdld || !gipa || !gdpa) { + if (!gipa || !gdpa) { return VK_ERROR_INITIALIZATION_FAILED; } create_info->u.pLayerInfo = create_info->u.pLayerInfo->pNext; @@ -324,7 +322,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( layer_context.contexts.try_emplace( key, std::make_shared<DeviceContext>(instance_context, *physical_context, - *pDevice, sdld, std::move(vtable))); + *pDevice, std::move(vtable))); return VK_SUCCESS; } diff --git a/src/queue_context.hh b/src/queue_context.hh index ba4708b..356de33 100644 --- a/src/queue_context.hh +++ b/src/queue_context.hh @@ -67,6 +67,7 @@ class QueueContext final : public Context { DeviceContext::Clock::time_point_t gpu_start; DeviceContext::Clock::time_point_t gpu_end; + DeviceContext::Clock::time_point_t::duration cpu_time; DeviceContext::Clock::time_point_t::duration gpu_time; std::unique_ptr<Frame> frame; |
