aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-04-04 14:09:39 +1100
committerNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-04-04 14:09:39 +1100
commiteffef8d4c4012f415c8cf869f9999232862009e2 (patch)
tree7f41b9c3ee74f2cd1cfeee80e366802c84ce36a5
parente5fb27bf76ea5f6e6bfd008ed3e976576306592b (diff)
Fix CmdWriteTimpstamps bit forward, re-add 'no-unused*' compiler warnings
-rw-r--r--src/layer.cc12
-rw-r--r--src/timestamp_pool.cc7
-rw-r--r--src/timestamp_pool.hh2
3 files changed, 10 insertions, 11 deletions
diff --git a/src/layer.cc b/src/layer.cc
index 2743030..3811fca 100644
--- a/src/layer.cc
+++ b/src/layer.cc
@@ -846,8 +846,9 @@ VkResult LatencySleepNV(VkDevice device, VkSwapchainKHR swapchain,
return VK_SUCCESS;
}
-void QueueNotifyOutOfBandNV(VkQueue queue,
- const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) {
+void QueueNotifyOutOfBandNV(
+ VkQueue queue,
+ [[maybe_unused]] const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) {
// Kind of interesting how you can't turn it back on once it's turned off.
// Also I really have no idea why pQueueTypeInfo's VkOutOfBandQueueTypeNV
@@ -874,13 +875,12 @@ VkResult SetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain,
return VK_SUCCESS;
}
-void SetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain,
- const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) {
+void SetLatencyMarkerNV(VkDevice, VkSwapchainKHR,
+ const VkSetLatencyMarkerInfoNV*) {
// STUB
}
-void GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain,
- VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) {
+void GetLatencyTimingsNV(VkDevice, VkSwapchainKHR, VkGetLatencyMarkerInfoNV*) {
// STUB
}
diff --git a/src/timestamp_pool.cc b/src/timestamp_pool.cc
index 2d43c58..80170e5 100644
--- a/src/timestamp_pool.cc
+++ b/src/timestamp_pool.cc
@@ -155,7 +155,7 @@ void TimestampPool::do_reaper(const std::stop_token stoken) {
}
void TimestampPool::Handle::write_command(
- const VkPipelineStageFlagBits2& bit) const {
+ const VkPipelineStageFlagBits2 bit) const {
const auto cbbi = VkCommandBufferBeginInfo{
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
@@ -170,9 +170,8 @@ void TimestampPool::Handle::write_command(
THROW_NOT_VKSUCCESS(vtable.ResetCommandBuffer(this->command_buffer, 0));
THROW_NOT_VKSUCCESS(vtable.BeginCommandBuffer(this->command_buffer, &cbbi));
- vtable.CmdWriteTimestamp2KHR(
- this->command_buffer, VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT,
- this->query_pool, static_cast<std::uint32_t>(this->query_index));
+ vtable.CmdWriteTimestamp2KHR(this->command_buffer, bit, this->query_pool,
+ static_cast<std::uint32_t>(this->query_index));
THROW_NOT_VKSUCCESS(vtable.EndCommandBuffer(this->command_buffer));
}
diff --git a/src/timestamp_pool.hh b/src/timestamp_pool.hh
index aad2e3e..038e9a4 100644
--- a/src/timestamp_pool.hh
+++ b/src/timestamp_pool.hh
@@ -124,7 +124,7 @@ class TimestampPool final {
public:
// Performs the Vulkan that sets up this command buffer for submission.
- void write_command(const VkPipelineStageFlagBits2& bit) const;
+ void write_command(const VkPipelineStageFlagBits2 bit) const;
public:
// Attempts to get the time - optional if it's not available yet.