diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-11-06 01:47:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-05 09:47:26 -0800 |
| commit | b118451e301d734e3e783b3acdf871f3f6ea851c (patch) | |
| tree | 277f160d31e2c442f724bc6a2d3c09fabff403ca /tools/gfx/vulkan/vk-command-encoder.cpp | |
| parent | 53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff) | |
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines
* format
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/vulkan/vk-command-encoder.cpp')
| -rw-r--r-- | tools/gfx/vulkan/vk-command-encoder.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/tools/gfx/vulkan/vk-command-encoder.cpp b/tools/gfx/vulkan/vk-command-encoder.cpp index f9caff437..42af3bee9 100644 --- a/tools/gfx/vulkan/vk-command-encoder.cpp +++ b/tools/gfx/vulkan/vk-command-encoder.cpp @@ -25,10 +25,15 @@ int PipelineCommandEncoder::getBindPointIndex(VkPipelineBindPoint bindPoint) { switch (bindPoint) { - case VK_PIPELINE_BIND_POINT_GRAPHICS: return 0; - case VK_PIPELINE_BIND_POINT_COMPUTE: return 1; - case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: return 2; - default: assert(!"unknown pipeline type."); return -1; + case VK_PIPELINE_BIND_POINT_GRAPHICS: + return 0; + case VK_PIPELINE_BIND_POINT_COMPUTE: + return 1; + case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: + return 2; + default: + assert(!"unknown pipeline type."); + return -1; } } @@ -1063,7 +1068,8 @@ void RenderCommandEncoder::setPrimitiveTopology(PrimitiveTopology topology) { switch (topology) { - case PrimitiveTopology::TriangleList: break; + case PrimitiveTopology::TriangleList: + break; default: // We are using a non-list topology, but we don't have dynmaic state // extension, error out. @@ -1107,9 +1113,14 @@ void RenderCommandEncoder::setIndexBuffer( VkIndexType indexType = VK_INDEX_TYPE_UINT16; switch (indexFormat) { - case Format::R16_UINT: indexType = VK_INDEX_TYPE_UINT16; break; - case Format::R32_UINT: indexType = VK_INDEX_TYPE_UINT32; break; - default: assert(!"unsupported index format"); + case Format::R16_UINT: + indexType = VK_INDEX_TYPE_UINT16; + break; + case Format::R32_UINT: + indexType = VK_INDEX_TYPE_UINT32; + break; + default: + assert(!"unsupported index format"); } BufferResourceImpl* bufferImpl = static_cast<BufferResourceImpl*>(buffer); @@ -1367,7 +1378,8 @@ void RayTracingCommandEncoder::_queryAccelerationStructureProperties( case QueryType::AccelerationStructureSerializedSize: queryType = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR; break; - case QueryType::AccelerationStructureCurrentSize: continue; + case QueryType::AccelerationStructureCurrentSize: + continue; default: getDebugCallback()->handleMessage( DebugMessageType::Error, |
