Merge 'Fix build warning created by "Add -Wshadow -Wconversion"' into 'main'

See merge request mesa/vulkan-wsi-layer!225
This commit is contained in:
Iason Paraskevopoulos 2026-01-05 11:48:08 +00:00
commit 0aaff54da1
4 changed files with 6 additions and 6 deletions

View file

@ -168,9 +168,9 @@ VkResult wsi_ext_present_timing::write_pending_results()
}
uint64_t timestamp;
VkResult res = m_device.disp.GetQueryPoolResults(m_device.device, m_queue_family_resources.m_query_pool,
slot.m_image_index, 1, sizeof(timestamp), &timestamp, 0,
VK_QUERY_RESULT_64_BIT);
VkResult res = m_device.disp.GetQueryPoolResults(
m_device.device, m_queue_family_resources.m_query_pool, slot.m_image_index, 1u, sizeof(timestamp),
&timestamp, static_cast<VkDeviceSize>(0), static_cast<VkQueryResultFlags>(VK_QUERY_RESULT_64_BIT));
if (res != VK_SUCCESS && res != VK_NOT_READY)
{
return res;

View file

@ -380,7 +380,7 @@ public:
for (uint32_t image_index = 0; image_index < num_images; image_index++)
{
TRY_LOG_CALL(m_device.disp.BeginCommandBuffer(m_command_buffer[image_index], &begin_info));
m_device.disp.CmdResetQueryPool(m_command_buffer[image_index], m_query_pool, image_index, 1);
m_device.disp.CmdResetQueryPool(m_command_buffer[image_index], m_query_pool, image_index, 1u);
m_device.disp.CmdWriteTimestamp(m_command_buffer[image_index], VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
m_query_pool, image_index);
TRY_LOG_CALL(m_device.disp.EndCommandBuffer(m_command_buffer[image_index]));

View file

@ -154,7 +154,7 @@ std::optional<uint64_t> wsi_ext_present_timing_headless::get_current_clock_time_
return std::nullopt;
}
return now.tv_sec * static_cast<uint64_t>(1e9) + now.tv_nsec;
return static_cast<uint64_t>(now.tv_sec) * static_cast<uint64_t>(1e9) + static_cast<uint64_t>(now.tv_nsec);
}
std::optional<uint64_t> wsi_ext_present_timing_headless::get_first_pixel_visible_timestamp_for_last_image() const

View file

@ -208,7 +208,7 @@ void swapchain::present_image(const pending_present_request &pending_present)
* This is OK as the sleep should only be dispatched on the page_flip thread and not on main. */
assert(m_page_flip_thread_run);
int64_t time_diff = absolute_future_present_time_ns - *current_time_ns;
int64_t time_diff = static_cast<int64_t>(absolute_future_present_time_ns - *current_time_ns);
std::this_thread::sleep_for(std::chrono::nanoseconds(time_diff));
}
}