summaryrefslogtreecommitdiff
path: root/tools/gfx/vulkan/vk-shader-table.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/gfx/vulkan/vk-shader-table.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/gfx/vulkan/vk-shader-table.cpp')
-rw-r--r--tools/gfx/vulkan/vk-shader-table.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/gfx/vulkan/vk-shader-table.cpp b/tools/gfx/vulkan/vk-shader-table.cpp
index beb826111..4d47a2b96 100644
--- a/tools/gfx/vulkan/vk-shader-table.cpp
+++ b/tools/gfx/vulkan/vk-shader-table.cpp
@@ -2,9 +2,8 @@
#include "vk-shader-table.h"
#include "vk-device.h"
-#include "vk-transient-heap.h"
-
#include "vk-helper-functions.h"
+#include "vk-transient-heap.h"
namespace gfx
{
@@ -24,11 +23,14 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer(
uint32_t handleSize = rtProps.shaderGroupHandleSize;
m_raygenTableSize = m_rayGenShaderCount * rtProps.shaderGroupBaseAlignment;
m_missTableSize = (uint32_t)VulkanUtil::calcAligned(
- m_missShaderCount * handleSize, rtProps.shaderGroupBaseAlignment);
+ m_missShaderCount * handleSize,
+ rtProps.shaderGroupBaseAlignment);
m_hitTableSize = (uint32_t)VulkanUtil::calcAligned(
- m_hitGroupCount * handleSize, rtProps.shaderGroupBaseAlignment);
+ m_hitGroupCount * handleSize,
+ rtProps.shaderGroupBaseAlignment);
m_callableTableSize = (uint32_t)VulkanUtil::calcAligned(
- m_callableShaderCount * handleSize, rtProps.shaderGroupBaseAlignment);
+ m_callableShaderCount * handleSize,
+ rtProps.shaderGroupBaseAlignment);
uint32_t tableSize = m_raygenTableSize + m_missTableSize + m_hitTableSize + m_callableTableSize;
auto pipelineImpl = static_cast<RayTracingPipelineStateImpl*>(pipeline);
@@ -51,8 +53,8 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer(
IBufferResource* stagingBuffer = nullptr;
Offset stagingBufferOffset = 0;
- transientHeapImpl->allocateStagingBuffer(
- tableSize, stagingBuffer, stagingBufferOffset, MemoryType::Upload);
+ transientHeapImpl
+ ->allocateStagingBuffer(tableSize, stagingBuffer, stagingBufferOffset, MemoryType::Upload);
assert(stagingBuffer);
void* stagingPtr = nullptr;