aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-02-16 17:21:16 +1100
committerNicolas James <nj3ahxac@gmail.com>2026-02-16 17:21:16 +1100
commit4c1a11fdb9200a4a54b3b282b6acd10e6ec583ce (patch)
tree09162047c89cb9404337b0babd0037ba3bdf583a
parentb79dc96e68848a4e313d400691bf047aa29973f6 (diff)
Remove sdld, we never use it
-rw-r--r--src/device_context.cc10
-rw-r--r--src/device_context.hh5
-rw-r--r--src/layer.cc6
-rw-r--r--src/queue_context.hh1
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;