From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tools/gfx/vulkan/vk-query.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tools/gfx/vulkan/vk-query.cpp') diff --git a/tools/gfx/vulkan/vk-query.cpp b/tools/gfx/vulkan/vk-query.cpp index ccdb84647..694896966 100644 --- a/tools/gfx/vulkan/vk-query.cpp +++ b/tools/gfx/vulkan/vk-query.cpp @@ -19,9 +19,7 @@ Result QueryPoolImpl::init(const IQueryPool::Desc& desc, DeviceImpl* device) createInfo.queryCount = (uint32_t)desc.count; switch (desc.type) { - case QueryType::Timestamp: - createInfo.queryType = VK_QUERY_TYPE_TIMESTAMP; - break; + case QueryType::Timestamp: createInfo.queryType = VK_QUERY_TYPE_TIMESTAMP; break; case QueryType::AccelerationStructureCompactedSize: createInfo.queryType = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR; break; @@ -31,8 +29,7 @@ Result QueryPoolImpl::init(const IQueryPool::Desc& desc, DeviceImpl* device) case QueryType::AccelerationStructureCurrentSize: // Vulkan does not support CurrentSize query, will not create actual pools here. return SLANG_OK; - default: - return SLANG_E_INVALID_ARG; + default: return SLANG_E_INVALID_ARG; } SLANG_VK_RETURN_ON_FAIL( m_device->m_api.vkCreateQueryPool(m_device->m_api.m_device, &createInfo, nullptr, &m_pool)); @@ -67,12 +64,18 @@ Result QueryPoolImpl::getResult(GfxIndex index, GfxCount count, uint64_t* data) } void _writeTimestamp( - VulkanApi* api, VkCommandBuffer vkCmdBuffer, IQueryPool* queryPool, SlangInt index) + VulkanApi* api, + VkCommandBuffer vkCmdBuffer, + IQueryPool* queryPool, + SlangInt index) { auto queryPoolImpl = static_cast(queryPool); api->vkCmdResetQueryPool(vkCmdBuffer, queryPoolImpl->m_pool, (uint32_t)index, 1); api->vkCmdWriteTimestamp( - vkCmdBuffer, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, queryPoolImpl->m_pool, (uint32_t)index); + vkCmdBuffer, + VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, + queryPoolImpl->m_pool, + (uint32_t)index); } } // namespace vk -- cgit v1.2.3