Skip to content

Commit c43f527

Browse files
committed
[style] Run clang-format on modified C++ files
Apply official clang-format guidelines to all hand-written files modified in our frame-looping fixes: - api_decoder.h - preload_file_processor.cpp - vulkan_decoder_base.h - vulkan_replay_frame_loop_consumer.cpp - vulkan_replay_frame_loop_consumer.h TAG=agy CONV=a0864ce4-0126-408e-ad0b-5302cffe1ff3
1 parent 1e1c428 commit c43f527

3 files changed

Lines changed: 36 additions & 37 deletions

File tree

framework/decode/api_decoder.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,42 +204,42 @@ class ApiDecoder
204204
const std::vector<uint8_t>& build_inputs,
205205
const uint8_t* build_inputs_data) = 0;
206206

207-
virtual void DispatchGetDxgiAdapterInfo(const format::DxgiAdapterInfoCommandHeader& adapter_info_header){};
207+
virtual void DispatchGetDxgiAdapterInfo(const format::DxgiAdapterInfoCommandHeader& adapter_info_header) {};
208208

209-
virtual void DispatchGetDx12RuntimeInfo(const format::Dx12RuntimeInfoCommandHeader& runtime_info_header){};
209+
virtual void DispatchGetDx12RuntimeInfo(const format::Dx12RuntimeInfoCommandHeader& runtime_info_header) {};
210210

211211
virtual void DispatchExecuteBlocksFromFile(format::ThreadId thread_id,
212212
uint32_t n_blocks,
213213
int64_t offset,
214-
const std::string& filename){};
214+
const std::string& filename) {};
215215

216-
virtual void SetCurrentBlockIndex(uint64_t block_index){};
216+
virtual void SetCurrentBlockIndex(uint64_t block_index) {};
217217

218218
// Expects zero-based frame_number to match the way FileProcessor::current_frame_number_ works
219-
virtual void SetCurrentFrameNumber(uint64_t frame_number){};
219+
virtual void SetCurrentFrameNumber(uint64_t frame_number) {};
220220

221-
virtual void SetCurrentApiCallId(format::ApiCallId api_call_id){};
221+
virtual void SetCurrentApiCallId(format::ApiCallId api_call_id) {};
222222

223223
virtual void DispatchSetTlasToBlasDependencyCommand(format::HandleId tlas,
224-
const std::vector<format::HandleId>& blases){};
224+
const std::vector<format::HandleId>& blases) {};
225225

226226
virtual void DispatchSetEnvironmentVariablesCommand(const format::SetEnvironmentVariablesCommand& header,
227-
const char* env_string){};
227+
const char* env_string) {};
228228

229229
virtual void DispatchVulkanAccelerationStructuresBuildMetaCommand(const uint8_t* parameter_buffer,
230-
size_t buffer_size){};
230+
size_t buffer_size) {};
231231

232232
virtual void DispatchVulkanAccelerationStructuresCopyMetaCommand(const uint8_t* parameter_buffer,
233-
size_t buffer_size){};
233+
size_t buffer_size) {};
234234

235235
virtual void DispatchVulkanAccelerationStructuresWritePropertiesMetaCommand(const uint8_t* parameter_buffer,
236-
size_t buffer_size){};
236+
size_t buffer_size) {};
237237

238238
virtual void DispatchViewRelativeLocation(format::ThreadId thread_id,
239-
const format::ViewRelativeLocation& location){};
239+
const format::ViewRelativeLocation& location) {};
240240

241241
virtual void DispatchInitializeMetaCommand(const format::InitializeMetaCommand& header,
242-
const uint8_t* initialization_parameters_data){};
242+
const uint8_t* initialization_parameters_data) {};
243243
};
244244

245245
GFXRECON_END_NAMESPACE(decode)

framework/decode/vulkan_replay_frame_loop_consumer.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ void VulkanReplayFrameLoopConsumer::Process_vkFreeDescriptorSets(const ApiCallIn
253253
call_info, returnValue, device, descriptorPool, descriptorSetCount, pDescriptorSets);
254254
}
255255

256-
257-
258256
void VulkanReplayFrameLoopConsumer::OnLoopStart()
259257
{
260258
WaitDevicesIdle();
@@ -273,7 +271,7 @@ void VulkanReplayFrameLoopConsumer::CaptureInitialFenceStates()
273271
auto device_info = table.GetVkDeviceInfo(fence_info->parent_id);
274272
if (device_info != nullptr && device_info->handle != VK_NULL_HANDLE)
275273
{
276-
VkDevice device = device_info->handle;
274+
VkDevice device = device_info->handle;
277275
const graphics::VulkanDeviceTable* device_table = GetDeviceTable(device);
278276
if (device_table != nullptr)
279277
{
@@ -282,7 +280,8 @@ void VulkanReplayFrameLoopConsumer::CaptureInitialFenceStates()
282280
GFXRECON_LOG_DEBUG(" Fence %" PRIu64 " (handle %" PRIu64 ") initial state: %s",
283281
fence_info->capture_id,
284282
(uint64_t)fence_info->handle,
285-
status == VK_SUCCESS ? "SIGNALED" : (status == VK_NOT_READY ? "UNSIGNALED" : "ERROR"));
283+
status == VK_SUCCESS ? "SIGNALED"
284+
: (status == VK_NOT_READY ? "UNSIGNALED" : "ERROR"));
286285
}
287286
}
288287
}
@@ -327,14 +326,18 @@ void VulkanReplayFrameLoopConsumer::FixupDeviceFences(format::HandleId device, f
327326

328327
if (initial_status == VK_NOT_READY && current_status == VK_SUCCESS)
329328
{
330-
GFXRECON_LOG_DEBUG("Fence %" PRIu64 " (handle %" PRIu64 ") was initially UNSIGNALED but is now SIGNALED. Will reset it.",
331-
fence_id, (uint64_t)fence_info->handle);
329+
GFXRECON_LOG_DEBUG("Fence %" PRIu64 " (handle %" PRIu64
330+
") was initially UNSIGNALED but is now SIGNALED. Will reset it.",
331+
fence_id,
332+
(uint64_t)fence_info->handle);
332333
fences_to_reset.push_back(fence_info->handle);
333334
}
334335
else if (initial_status == VK_SUCCESS && current_status == VK_NOT_READY)
335336
{
336-
GFXRECON_LOG_DEBUG("Fence %" PRIu64 " (handle %" PRIu64 ") was initially SIGNALED but is now UNSIGNALED. Will signal it.",
337-
fence_id, (uint64_t)fence_info->handle);
337+
GFXRECON_LOG_DEBUG("Fence %" PRIu64 " (handle %" PRIu64
338+
") was initially SIGNALED but is now UNSIGNALED. Will signal it.",
339+
fence_id,
340+
(uint64_t)fence_info->handle);
338341
fences_to_signal.push_back(fence_info->handle);
339342
}
340343
}
@@ -352,7 +355,7 @@ void VulkanReplayFrameLoopConsumer::FixupDeviceFences(format::HandleId device, f
352355
VulkanQueueInfo* queue_info = table.GetVkQueueInfo(queue);
353356
for (VkFence fence : fences_to_signal)
354357
{
355-
VkResult result = device_table->QueueSubmit(queue_info->handle, 0, nullptr, fence);
358+
VkResult result = device_table->QueueSubmit(queue_info->handle, 0, nullptr, fence);
356359
CHECK_VK_RESULT(result, "vkQueueSubmit");
357360
}
358361
}
@@ -382,8 +385,6 @@ void VulkanReplayFrameLoopConsumer::Process_vkMapMemory(const ApiCallInfo&
382385
VulkanReplayConsumer::Process_vkMapMemory(call_info, returnValue, device, memory, offset, size, flags, ppData);
383386
}
384387

385-
386-
387388
void VulkanReplayFrameLoopConsumer::Process_vkQueuePresentKHR(
388389
const ApiCallInfo& call_info,
389390
VkResult returnValue,
@@ -412,12 +413,11 @@ void VulkanReplayFrameLoopConsumer::Process_vkQueuePresentKHR(
412413
}
413414
}
414415

415-
void VulkanReplayFrameLoopConsumer::Process_vkCmdWriteTimestamp(
416-
const ApiCallInfo& call_info,
417-
format::HandleId commandBuffer,
418-
VkPipelineStageFlagBits pipelineStage,
419-
format::HandleId queryPool,
420-
uint32_t query)
416+
void VulkanReplayFrameLoopConsumer::Process_vkCmdWriteTimestamp(const ApiCallInfo& call_info,
417+
format::HandleId commandBuffer,
418+
VkPipelineStageFlagBits pipelineStage,
419+
format::HandleId queryPool,
420+
uint32_t query)
421421
{
422422
if (frame_loop_info_.IsRepetition())
423423
{

framework/decode/vulkan_replay_frame_loop_consumer.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ class VulkanReplayFrameLoopConsumer : public VulkanReplayFrameLoopConsumerBase,
3838
VulkanReplayFrameLoopConsumer(std::shared_ptr<application::Application> application,
3939
const VulkanReplayOptions& options,
4040
graphics::FrameLoopInfo& frame_loop_info) :
41-
VulkanReplayFrameLoopConsumerBase(application, options),
42-
frame_loop_info_(frame_loop_info)
41+
VulkanReplayFrameLoopConsumerBase(application, options), frame_loop_info_(frame_loop_info)
4342
{}
4443

4544
graphics::FrameLoopInfo& getFrameLoopInfo() override { return frame_loop_info_; }
@@ -91,11 +90,11 @@ class VulkanReplayFrameLoopConsumer : public VulkanReplayFrameLoopConsumerBase,
9190
format::HandleId queue,
9291
StructPointerDecoder<Decoded_VkPresentInfoKHR>* pPresentInfo) override;
9392

94-
void Process_vkCmdWriteTimestamp(const ApiCallInfo& call_info,
95-
format::HandleId commandBuffer,
96-
VkPipelineStageFlagBits pipelineStage,
97-
format::HandleId queryPool,
98-
uint32_t query) override;
93+
void Process_vkCmdWriteTimestamp(const ApiCallInfo& call_info,
94+
format::HandleId commandBuffer,
95+
VkPipelineStageFlagBits pipelineStage,
96+
format::HandleId queryPool,
97+
uint32_t query) override;
9998

10099
void Process_vkMapMemory(const ApiCallInfo& call_info,
101100
VkResult returnValue,

0 commit comments

Comments
 (0)