From 9d39b8e1a8d3d8b197767c5e891a9aa8eab4b883 Mon Sep 17 00:00:00 2001
From: baldurk
Date: Fri, 1 Sep 2023 11:45:18 +0100
Subject: [PATCH] Reformat code for clang-format 15
---
qrenderdoc/Code/BufferFormatter.cpp | 24 +-
qrenderdoc/Code/CaptureContext.cpp | 64 +--
.../Code/Interface/ShaderProcessingTool.cpp | 6 +-
qrenderdoc/Code/QRDUtils.cpp | 16 +-
qrenderdoc/Code/QRDUtils.h | 4 +-
qrenderdoc/Code/ReplayManager.cpp | 10 +-
qrenderdoc/Code/Resources.h | 22 +-
qrenderdoc/Code/pyrenderdoc/PythonContext.cpp | 9 +-
qrenderdoc/Code/pyrenderdoc/PythonContext.h | 7 +-
qrenderdoc/Code/qrenderdoc.cpp | 1 -
qrenderdoc/Styles/RDStyle/RDStyle.cpp | 10 +-
qrenderdoc/Widgets/CustomPaintWidget.cpp | 2 +-
qrenderdoc/Widgets/Extended/RDTextEdit.cpp | 9 +-
qrenderdoc/Widgets/Extended/RDTreeWidget.cpp | 1 -
qrenderdoc/Windows/BufferViewer.cpp | 3 +-
qrenderdoc/Windows/CommentView.cpp | 1 -
.../Windows/Dialogs/AxisMappingDialog.cpp | 3 +-
qrenderdoc/Windows/Dialogs/CaptureDialog.cpp | 1 -
qrenderdoc/Windows/Dialogs/CrashDialog.cpp | 14 +-
.../Windows/Dialogs/EnvironmentEditor.cpp | 4 +-
qrenderdoc/Windows/Dialogs/LiveCapture.cpp | 9 +-
qrenderdoc/Windows/Dialogs/RemoteManager.cpp | 2 +-
qrenderdoc/Windows/Dialogs/SettingsDialog.cpp | 4 +-
qrenderdoc/Windows/Dialogs/UpdateDialog.cpp | 13 +-
.../Windows/Dialogs/VirtualFileDialog.cpp | 59 +-
qrenderdoc/Windows/EventBrowser.cpp | 75 ++-
qrenderdoc/Windows/MainWindow.cpp | 21 +-
.../D3D11PipelineStateViewer.cpp | 178 ++++--
.../D3D12PipelineStateViewer.cpp | 155 +++--
.../PipelineState/GLPipelineStateViewer.cpp | 251 ++++----
.../PipelineState/PipelineStateViewer.cpp | 68 +--
.../VulkanPipelineStateViewer.cpp | 264 ++++++---
qrenderdoc/Windows/PythonShell.cpp | 25 +-
qrenderdoc/Windows/ResourceInspector.cpp | 1 -
qrenderdoc/Windows/ShaderMessageViewer.cpp | 15 +-
qrenderdoc/Windows/ShaderViewer.cpp | 86 ++-
qrenderdoc/Windows/TextureViewer.cpp | 8 +-
renderdoc/android/android.cpp | 8 +-
renderdoc/api/app/renderdoc_app.h | 12 +-
renderdoc/api/replay/apidefs.h | 74 ++-
renderdoc/api/replay/data_types.h | 14 +-
renderdoc/api/replay/rdcstr.h | 4 +-
renderdoc/api/replay/renderdoc_replay.h | 6 +-
renderdoc/api/replay/replay_enums.h | 157 +++--
renderdoc/api/replay/stringise.h | 4 +-
renderdoc/api/replay/version.h | 6 +-
renderdoc/common/dds_readwrite.cpp | 9 +-
renderdoc/common/wrapped_pool.h | 23 +-
renderdoc/core/core.h | 27 +-
renderdoc/core/replay_proxy.cpp | 2 +-
renderdoc/core/settings.h | 10 +-
renderdoc/core/sparse_page_table.cpp | 3 +-
renderdoc/core/target_control.cpp | 3 +-
renderdoc/data/glsl/array2ms.comp | 2 +-
renderdoc/data/glsl/deptharr2ms.frag | 2 +-
renderdoc/data/glsl/vk_depthbuf2ms.frag | 2 +-
renderdoc/data/glsl/vk_texsample.h | 15 +-
renderdoc/data/glsl_shaders.cpp | 7 +-
renderdoc/data/hlsl/histogram.hlsl | 9 +-
renderdoc/data/hlsl/mesh.hlsl | 16 +-
renderdoc/data/hlsl/pixelhistory.hlsl | 5 +-
renderdoc/data/hlsl/shaderdebug.hlsl | 3 +-
renderdoc/data/hlsl/text.hlsl | 5 +-
renderdoc/driver/d3d11/d3d11_context.cpp | 15 +-
renderdoc/driver/d3d11/d3d11_context_wrap.cpp | 12 +-
renderdoc/driver/d3d11/d3d11_debug.cpp | 3 +-
renderdoc/driver/d3d11/d3d11_device.cpp | 8 +-
renderdoc/driver/d3d11/d3d11_overlay.cpp | 12 +-
renderdoc/driver/d3d11/d3d11_pixelhistory.cpp | 21 +-
renderdoc/driver/d3d11/d3d11_rendermesh.cpp | 10 +-
renderdoc/driver/d3d11/d3d11_rendertext.cpp | 5 +-
renderdoc/driver/d3d11/d3d11_replay.cpp | 25 +-
renderdoc/driver/d3d11/d3d11_resources.h | 3 +-
renderdoc/driver/d3d11/d3d11_shader_cache.cpp | 8 +-
renderdoc/driver/d3d11/d3d11_shaderdebug.cpp | 5 +-
renderdoc/driver/d3d11/d3d11_video.cpp | 6 +-
.../driver/d3d12/d3d12_command_list4_wrap.cpp | 8 +-
.../driver/d3d12/d3d12_command_list_wrap.cpp | 10 +-
.../driver/d3d12/d3d12_command_queue_wrap.cpp | 5 +-
renderdoc/driver/d3d12/d3d12_commands.cpp | 4 +-
renderdoc/driver/d3d12/d3d12_debug.cpp | 3 +-
renderdoc/driver/d3d12/d3d12_device.h | 6 +-
renderdoc/driver/d3d12/d3d12_device_wrap.cpp | 4 +-
renderdoc/driver/d3d12/d3d12_manager.h | 4 +-
renderdoc/driver/d3d12/d3d12_overlay.cpp | 4 +-
renderdoc/driver/d3d12/d3d12_rendermesh.cpp | 5 +-
renderdoc/driver/d3d12/d3d12_rendertext.cpp | 36 +-
renderdoc/driver/d3d12/d3d12_resources.h | 75 ++-
renderdoc/driver/d3d12/d3d12_shader_cache.cpp | 14 +-
.../driver/d3d12/d3d12_shader_feedback.cpp | 6 +-
renderdoc/driver/d3d12/d3d12_shaderdebug.cpp | 5 +-
renderdoc/driver/dxgi/dxgi_common.cpp | 20 +-
renderdoc/driver/dxgi/dxgi_wrapped.h | 10 +-
renderdoc/driver/gl/cgl_platform_helpers.mm | 6 +-
renderdoc/driver/gl/egl_hooks.cpp | 9 +-
renderdoc/driver/gl/egl_platform.cpp | 6 +-
renderdoc/driver/gl/gl_common.cpp | 60 +-
renderdoc/driver/gl/gl_common.h | 15 +-
renderdoc/driver/gl/gl_debug.cpp | 48 +-
renderdoc/driver/gl/gl_driver.cpp | 9 +-
renderdoc/driver/gl/gl_hooks.cpp | 2 +-
renderdoc/driver/gl/gl_pixelhistory.cpp | 5 +-
renderdoc/driver/gl/gl_postvs.cpp | 5 +-
renderdoc/driver/gl/gl_program_iterate.cpp | 8 +-
renderdoc/driver/gl/gl_rendermesh.cpp | 5 +-
renderdoc/driver/gl/gl_renderstate.cpp | 45 +-
renderdoc/driver/gl/gl_rendertexture.cpp | 5 +-
renderdoc/driver/gl/gl_replay.cpp | 6 +-
renderdoc/driver/gl/gl_resources.cpp | 30 +-
renderdoc/driver/gl/glx_platform.cpp | 28 +-
renderdoc/driver/gl/wgl_hooks.cpp | 10 +-
.../gl/wrappers/gl_framebuffer_funcs.cpp | 6 +-
.../driver/ihv/nv/nv_counter_enumerator.cpp | 9 +-
.../metal/metal_command_buffer_bridge.mm | 8 +-
.../metal/metal_command_queue_bridge.mm | 4 +-
renderdoc/driver/metal/metal_common.cpp | 3 +-
renderdoc/driver/metal/metal_core.cpp | 3 +-
renderdoc/driver/metal/metal_device.cpp | 4 +-
renderdoc/driver/metal/metal_device_bridge.mm | 64 +--
.../driver/metal/metal_function_bridge.mm | 4 +-
renderdoc/driver/metal/metal_hook_bridge.mm | 9 +-
.../metal_render_command_encoder_bridge.mm | 18 +-
.../metal_render_pipeline_state_bridge.mm | 22 +-
renderdoc/driver/metal/metal_resources.cpp | 7 +-
.../driver/metal/metal_texture_bridge.mm | 4 +-
renderdoc/driver/metal/metal_types.cpp | 2 +-
renderdoc/driver/metal/metal_types.h | 5 +-
.../driver/shaders/dxbc/dxbc_bytecode.cpp | 10 +-
.../shaders/dxbc/dxbc_bytecode_editor.cpp | 21 +-
.../driver/shaders/dxbc/dxbc_bytecode_ops.cpp | 3 +-
.../shaders/dxbc/dxbc_bytecode_vendorext.cpp | 6 +-
.../driver/shaders/dxbc/dxbc_container.cpp | 4 +-
.../driver/shaders/dxbc/dxbc_container.h | 1 -
renderdoc/driver/shaders/dxbc/dxbc_debug.cpp | 227 ++++----
renderdoc/driver/shaders/dxbc/dxbc_sdbg.h | 8 +-
renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp | 2 +-
.../shaders/dxil/dxil_bytecode_editor.cpp | 27 +-
.../driver/shaders/dxil/llvm_decoder.cpp | 50 +-
.../driver/shaders/dxil/llvm_encoder.cpp | 124 +++-
.../driver/shaders/spirv/spirv_debug.cpp | 122 ++--
.../shaders/spirv/spirv_debug_setup.cpp | 23 +-
.../shaders/spirv/spirv_disassemble.cpp | 22 +-
.../driver/shaders/spirv/spirv_reflect.cpp | 4 +-
renderdoc/driver/vulkan/imgrefs_tests.cpp | 115 +++-
renderdoc/driver/vulkan/vk_common.h | 99 ++--
renderdoc/driver/vulkan/vk_core.cpp | 539 ++++++++++++------
renderdoc/driver/vulkan/vk_debug.cpp | 172 ++++--
renderdoc/driver/vulkan/vk_dispatchtables.cpp | 4 +-
renderdoc/driver/vulkan/vk_initstate.cpp | 28 +-
renderdoc/driver/vulkan/vk_layer.cpp | 36 +-
renderdoc/driver/vulkan/vk_manager.h | 8 +-
renderdoc/driver/vulkan/vk_memory.cpp | 5 +-
.../driver/vulkan/vk_msaa_buffer_conv.cpp | 38 +-
renderdoc/driver/vulkan/vk_next_chains.cpp | 4 +-
renderdoc/driver/vulkan/vk_outputwindow.cpp | 22 +-
renderdoc/driver/vulkan/vk_overlay.cpp | 20 +-
renderdoc/driver/vulkan/vk_pixelhistory.cpp | 52 +-
renderdoc/driver/vulkan/vk_posix.cpp | 6 +-
renderdoc/driver/vulkan/vk_postvs.cpp | 46 +-
renderdoc/driver/vulkan/vk_rendermesh.cpp | 25 +-
renderdoc/driver/vulkan/vk_rendertext.cpp | 14 +-
renderdoc/driver/vulkan/vk_rendertexture.cpp | 8 +-
renderdoc/driver/vulkan/vk_replay.cpp | 97 +++-
renderdoc/driver/vulkan/vk_resources.cpp | 25 +-
renderdoc/driver/vulkan/vk_resources.h | 39 +-
renderdoc/driver/vulkan/vk_serialise.cpp | 19 +-
.../driver/vulkan/vk_shader_feedback.cpp | 8 +-
renderdoc/driver/vulkan/vk_shaderdebug.cpp | 81 ++-
renderdoc/driver/vulkan/vk_state.cpp | 12 +-
renderdoc/driver/vulkan/vk_state.h | 3 +-
.../driver/vulkan/wrappers/vk_cmd_funcs.cpp | 18 +-
.../vulkan/wrappers/vk_device_funcs.cpp | 12 +-
.../driver/vulkan/wrappers/vk_draw_funcs.cpp | 7 +-
.../vulkan/wrappers/vk_dynamic_funcs.cpp | 16 +-
.../driver/vulkan/wrappers/vk_misc_funcs.cpp | 8 +-
.../vulkan/wrappers/vk_resource_funcs.cpp | 16 +-
.../driver/vulkan/wrappers/vk_sync_funcs.cpp | 8 +-
.../driver/vulkan/wrappers/vk_wsi_funcs.cpp | 12 +-
renderdoc/maths/formatpacking.cpp | 40 +-
renderdoc/os/posix/android/android_hook.cpp | 2 +-
renderdoc/os/posix/linux/linux_process.cpp | 3 +-
renderdoc/os/posix/posix_process.cpp | 1 -
renderdoc/os/posix/posix_threading.cpp | 2 +-
renderdoc/os/win32/dia2_stubs.h | 2 +-
renderdoc/os/win32/sys_win32_hooks.cpp | 211 +++----
renderdoc/os/win32/win32_callstack.cpp | 3 +-
renderdoc/os/win32/win32_process.cpp | 2 +-
renderdoc/os/win32/win32_shellext.cpp | 6 +-
renderdoc/os/win32/win32_threading.cpp | 2 +-
renderdoc/replay/basic_types_tests.cpp | 2 -
renderdoc/replay/entry_points.cpp | 9 +-
renderdoc/replay/replay_controller.cpp | 5 +-
renderdoc/replay/replay_driver.cpp | 20 +-
.../serialise/codecs/chrome_json_codec.cpp | 3 +-
renderdoc/serialise/codecs/xml_codec.cpp | 6 +-
renderdoc/serialise/rdcfile.cpp | 15 +-
renderdoc/serialise/streamio_tests.cpp | 1 -
renderdoccmd/renderdoccmd.cpp | 18 +-
renderdoccmd/renderdoccmd_android.cpp | 3 +-
renderdocshim/renderdocshim.cpp | 2 +-
util/test/demos/android/android_platform.cpp | 44 +-
util/test/demos/android/android_platform.h | 44 +-
util/test/demos/android/android_window.cpp | 44 +-
util/test/demos/android/android_window.h | 44 +-
util/test/demos/apple/apple_platform.cpp | 44 +-
util/test/demos/apple/apple_platform.h | 44 +-
util/test/demos/apple/apple_window.cpp | 44 +-
util/test/demos/apple/apple_window.h | 44 +-
util/test/demos/apple/nuklear_appkit.h | 14 +-
.../demos/d3d11/d3d11_binding_hazards.cpp | 3 +-
util/test/demos/d3d11/d3d11_helpers.cpp | 195 +++++--
util/test/demos/d3d11/d3d11_helpers.h | 44 +-
util/test/demos/d3d11/d3d11_mip_rtv.cpp | 4 +-
.../demos/d3d11/d3d11_pixel_history_zoo.cpp | 7 +-
.../demos/d3d11/d3d11_primitive_restart.cpp | 36 +-
.../demos/d3d11/d3d11_resource_lifetimes.cpp | 20 +-
util/test/demos/d3d11/d3d11_saturate.cpp | 6 +-
.../demos/d3d11/d3d11_shader_debug_zoo.cpp | 35 +-
.../demos/d3d11/d3d11_simple_dispatch.cpp | 6 +-
util/test/demos/d3d11/d3d11_stream_out.cpp | 27 +-
...d11_structured_buffer_misaligned_dirty.cpp | 3 +-
.../d3d11/d3d11_structured_buffer_read.cpp | 3 +-
util/test/demos/d3d11/d3d11_test.cpp | 49 +-
util/test/demos/d3d11/d3d11_test.h | 44 +-
util/test/demos/d3d11/d3d11_texture_zoo.cpp | 19 +-
.../demos/d3d11/d3d11_vertex_attr_zoo.cpp | 72 ++-
.../test/demos/d3d11/d3d11_video_textures.cpp | 13 +-
util/test/demos/d3d12/d3d12_compute_only.cpp | 3 +-
.../demos/d3d12/d3d12_descriptor_indexing.cpp | 7 +-
util/test/demos/d3d12/d3d12_helpers.cpp | 241 +++++---
util/test/demos/d3d12/d3d12_helpers.h | 44 +-
util/test/demos/d3d12/d3d12_parameter_zoo.cpp | 3 +-
.../demos/d3d12/d3d12_resource_lifetimes.cpp | 20 +-
.../d3d12/d3d12_resource_mapping_zoo.cpp | 3 +-
.../demos/d3d12/d3d12_shader_debug_zoo.cpp | 54 +-
util/test/demos/d3d12/d3d12_test.cpp | 44 +-
util/test/demos/d3d12/d3d12_test.h | 44 +-
util/test/demos/d3d12/d3d12_texture_zoo.cpp | 17 +-
.../demos/d3d12/d3d12_vertex_attr_zoo.cpp | 72 ++-
util/test/demos/d3d12/d3d12_vertex_uav.cpp | 3 +-
.../test/demos/d3d12/d3d12_video_textures.cpp | 3 +-
util/test/demos/d3d12/d3d12_vrs.cpp | 3 +-
util/test/demos/dx/d3d_helpers.cpp | 44 +-
util/test/demos/dx/d3d_helpers.h | 44 +-
util/test/demos/gl/gl_buffer_updates.cpp | 11 +-
util/test/demos/gl/gl_cbuffer_zoo.cpp | 40 +-
util/test/demos/gl/gl_discard_zoo.cpp | 5 +-
util/test/demos/gl/gl_large_bcn_arrays.cpp | 6 +-
util/test/demos/gl/gl_resource_lifetimes.cpp | 20 +-
util/test/demos/gl/gl_spirv_shader.cpp | 20 +-
util/test/demos/gl/gl_test.cpp | 44 +-
util/test/demos/gl/gl_test.h | 44 +-
util/test/demos/gl/gl_test_android.cpp | 44 +-
util/test/demos/gl/gl_test_linux.cpp | 44 +-
util/test/demos/gl/gl_test_win32.cpp | 44 +-
util/test/demos/gl/gl_texture_zoo.cpp | 8 +-
util/test/demos/linux/linux_platform.cpp | 44 +-
util/test/demos/linux/linux_platform.h | 44 +-
util/test/demos/linux/linux_window.cpp | 44 +-
util/test/demos/linux/linux_window.h | 44 +-
util/test/demos/main.cpp | 5 +-
util/test/demos/renderdoc_app.h | 12 +-
util/test/demos/test_common.cpp | 44 +-
util/test/demos/test_common.h | 44 +-
util/test/demos/texture_zoo.cpp | 54 +-
util/test/demos/vk/vk_adv_cbuffer_zoo.cpp | 18 +-
util/test/demos/vk/vk_blend.cpp | 12 +-
util/test/demos/vk/vk_buffer_truncation.cpp | 16 +-
util/test/demos/vk/vk_cbuffer_zoo.cpp | 26 +-
util/test/demos/vk/vk_compute_only.cpp | 22 +-
util/test/demos/vk/vk_custom_border_color.cpp | 13 +-
.../test/demos/vk/vk_dedicated_allocation.cpp | 23 +-
util/test/demos/vk/vk_descriptor_index.cpp | 67 ++-
util/test/demos/vk/vk_descriptor_reuse.cpp | 39 +-
.../demos/vk/vk_descriptor_variable_count.cpp | 49 +-
util/test/demos/vk/vk_discard_rects.cpp | 3 +-
util/test/demos/vk/vk_discard_zoo.cpp | 52 +-
util/test/demos/vk/vk_draw_zoo.cpp | 30 +-
util/test/demos/vk/vk_dynamic_rendering.cpp | 31 +-
util/test/demos/vk/vk_extended_dyn_state.cpp | 13 +-
util/test/demos/vk/vk_graphics_pipeline.cpp | 76 ++-
util/test/demos/vk/vk_headers.h | 95 +--
util/test/demos/vk/vk_helpers.cpp | 52 +-
util/test/demos/vk/vk_helpers.h | 100 ++--
util/test/demos/vk/vk_image_layouts.cpp | 13 +-
.../demos/vk/vk_imageless_framebuffer.cpp | 31 +-
util/test/demos/vk/vk_indirect.cpp | 54 +-
util/test/demos/vk/vk_int8_ibuffer.cpp | 26 +-
util/test/demos/vk/vk_large_buffer.cpp | 16 +-
.../demos/vk/vk_large_descriptor_sets.cpp | 27 +-
util/test/demos/vk/vk_leak_check.cpp | 13 +-
util/test/demos/vk/vk_line_raster.cpp | 8 +-
util/test/demos/vk/vk_load_store_none.cpp | 30 +-
util/test/demos/vk/vk_mem_bench.cpp | 28 +-
util/test/demos/vk/vk_mesh_zoo.cpp | 53 +-
util/test/demos/vk/vk_misaligned_dirty.cpp | 16 +-
util/test/demos/vk/vk_multi_entry.cpp | 28 +-
util/test/demos/vk/vk_multi_present.cpp | 20 +-
.../test/demos/vk/vk_multi_thread_windows.cpp | 8 +-
util/test/demos/vk/vk_overlay_test.cpp | 70 ++-
util/test/demos/vk/vk_parameter_zoo.cpp | 55 +-
util/test/demos/vk/vk_pixel_history.cpp | 17 +-
util/test/demos/vk/vk_postponed.cpp | 18 +-
util/test/demos/vk/vk_query_pool.cpp | 8 +-
.../demos/vk/vk_read_before_overwrite.cpp | 34 +-
util/test/demos/vk/vk_resource_lifetimes.cpp | 80 ++-
util/test/demos/vk/vk_robustness2.cpp | 22 +-
util/test/demos/vk/vk_sample_locations.cpp | 25 +-
util/test/demos/vk/vk_secondary_cmdbuf.cpp | 8 +-
.../vk/vk_separate_depth_stencil_layouts.cpp | 46 +-
util/test/demos/vk/vk_shader_debug_zoo.cpp | 95 +--
util/test/demos/vk/vk_shader_editing.cpp | 30 +-
util/test/demos/vk/vk_shader_isa.cpp | 13 +-
util/test/demos/vk/vk_shader_printf.cpp | 19 +-
util/test/demos/vk/vk_simple_triangle.cpp | 18 +-
util/test/demos/vk/vk_spec_constants.cpp | 14 +-
util/test/demos/vk/vk_spirv_13_shaders.cpp | 8 +-
.../demos/vk/vk_structured_buffer_nested.cpp | 18 +-
util/test/demos/vk/vk_sync2.cpp | 13 +-
util/test/demos/vk/vk_test.cpp | 71 +--
util/test/demos/vk/vk_test.h | 44 +-
util/test/demos/vk/vk_texture_zoo.cpp | 42 +-
util/test/demos/vk/vk_triangle_fan.cpp | 3 +-
util/test/demos/vk/vk_validation_use.cpp | 13 +-
util/test/demos/vk/vk_video_textures.cpp | 16 +-
util/test/demos/vk/vk_vs_max_desc_set.cpp | 23 +-
util/test/demos/win32/win32_platform.cpp | 44 +-
util/test/demos/win32/win32_platform.h | 44 +-
util/test/demos/win32/win32_window.cpp | 44 +-
util/test/demos/win32/win32_window.h | 44 +-
330 files changed, 5856 insertions(+), 3850 deletions(-)
diff --git a/qrenderdoc/Code/BufferFormatter.cpp b/qrenderdoc/Code/BufferFormatter.cpp
index 21ab602c8..df430b7d7 100644
--- a/qrenderdoc/Code/BufferFormatter.cpp
+++ b/qrenderdoc/Code/BufferFormatter.cpp
@@ -783,8 +783,7 @@ ParsedFormat BufferFormatter::ParseFormatString(const QString &formatString, uin
// try to pick up common aliases that people might use
if(packrule == lit("d3dcbuffer") || packrule == lit("cbuffer") || packrule == lit("cb"))
pack = Packing::D3DCB;
- else if(packrule == lit("d3duav") || packrule == lit("uav") ||
- packrule == lit("structured"))
+ else if(packrule == lit("d3duav") || packrule == lit("uav") || packrule == lit("structured"))
pack = Packing::D3DUAV;
else if(packrule == lit("std140") || packrule == lit("ubo") || packrule == lit("gl") ||
packrule == lit("gles") || packrule == lit("opengl") || packrule == lit("glsl"))
@@ -1007,8 +1006,9 @@ ParsedFormat BufferFormatter::ParseFormatString(const QString &formatString, uin
bool matched = MatchBaseTypeDeclaration(baseType, false, tmp);
- if(!matched || (VarTypeCompType(tmp.type.baseType) != CompType::UInt &&
- VarTypeCompType(tmp.type.baseType) != CompType::SInt) ||
+ if(!matched ||
+ (VarTypeCompType(tmp.type.baseType) != CompType::UInt &&
+ VarTypeCompType(tmp.type.baseType) != CompType::SInt) ||
tmp.type.flags != ShaderVariableFlags::NoFlags)
{
reportError(tr("Invalid enum base type '%1', must be an integer type.").arg(baseType));
@@ -2338,9 +2338,7 @@ QString BufferFormatter::GetTextureFormatString(const TextureDescription &tex)
case ResourceFormatType::BC4:
case ResourceFormatType::ETC2:
case ResourceFormatType::EAC:
- case ResourceFormatType::PVRTC:
- baseType = lit("[[hex]] int2");
- break;
+ case ResourceFormatType::PVRTC: baseType = lit("[[hex]] int2"); break;
// 4x4 byte block, for 128-bit block formats
case ResourceFormatType::BC2:
case ResourceFormatType::BC3:
@@ -3260,13 +3258,19 @@ QVariantList GetVariants(ResourceFormat format, const ShaderConstant &var, const
uint32_t packed = readObj(data, end, ok);
uint32_t mantissas[] = {
- (packed >> 0) & 0x3f, (packed >> 11) & 0x3f, (packed >> 22) & 0x1f,
+ (packed >> 0) & 0x3f,
+ (packed >> 11) & 0x3f,
+ (packed >> 22) & 0x1f,
};
int32_t exponents[] = {
- int32_t(packed >> 6) & 0x1f, int32_t(packed >> 17) & 0x1f, int32_t(packed >> 27) & 0x1f,
+ int32_t(packed >> 6) & 0x1f,
+ int32_t(packed >> 17) & 0x1f,
+ int32_t(packed >> 27) & 0x1f,
};
static const uint32_t leadbit[] = {
- 0x40, 0x40, 0x20,
+ 0x40,
+ 0x40,
+ 0x20,
};
for(int i = 0; i < 3; i++)
diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp
index addd3f360..90ccf0e70 100644
--- a/qrenderdoc/Code/CaptureContext.cpp
+++ b/qrenderdoc/Code/CaptureContext.cpp
@@ -849,9 +849,9 @@ void CaptureContext::LoadCapture(const rdcstr &captureFile, const ReplayOptions
QElapsedTimer loadTimer;
loadTimer.start();
- ShowProgressDialog(m_MainWindow, tr("Loading Capture: %1").arg(QFileInfo(origFilename).fileName()),
- [this]() { return !m_LoadInProgress; },
- [this]() { return UpdateLoadProgress(); });
+ ShowProgressDialog(
+ m_MainWindow, tr("Loading Capture: %1").arg(QFileInfo(origFilename).fileName()),
+ [this]() { return !m_LoadInProgress; }, [this]() { return UpdateLoadProgress(); });
if(local)
{
@@ -1270,8 +1270,9 @@ void CaptureContext::RecompressCapture()
th->wait(500);
if(th->isRunning())
{
- ShowProgressDialog(m_MainWindow, tr("Recompressing file."), [th]() { return !th->isRunning(); },
- [&progress]() { return progress; });
+ ShowProgressDialog(
+ m_MainWindow, tr("Recompressing file."), [th]() { return !th->isRunning(); },
+ [&progress]() { return progress; });
}
th->deleteLater();
@@ -1477,7 +1478,6 @@ bool CaptureContext::ImportCapture(const CaptureFileFormat &fmt, const rdcstr &i
float progress = 0.0f;
LambdaThread *th = new LambdaThread([rdcfile, importfile, ext, &progress, &result]() {
-
ICaptureFile *file = RENDERDOC_OpenCaptureFile();
result = file->OpenFile(importfile, ext.toUtf8().data(),
@@ -1499,8 +1499,9 @@ bool CaptureContext::ImportCapture(const CaptureFileFormat &fmt, const rdcstr &i
th->wait(500);
if(th->isRunning())
{
- ShowProgressDialog(m_MainWindow, tr("Importing from %1, please wait...").arg(filename),
- [th]() { return !th->isRunning(); }, [&progress]() { return progress; });
+ ShowProgressDialog(
+ m_MainWindow, tr("Importing from %1, please wait...").arg(filename),
+ [th]() { return !th->isRunning(); }, [&progress]() { return progress; });
}
th->deleteLater();
@@ -1564,9 +1565,9 @@ void CaptureContext::ExportCapture(const CaptureFileFormat &fmt, const rdcstr &e
th->wait(500);
if(th->isRunning())
{
- ShowProgressDialog(m_MainWindow,
- tr("Exporting %1 to %2, please wait...").arg(filename).arg(QString(fmt.name)),
- [th]() { return !th->isRunning(); }, [&progress]() { return progress; });
+ ShowProgressDialog(
+ m_MainWindow, tr("Exporting %1 to %2, please wait...").arg(filename).arg(QString(fmt.name)),
+ [th]() { return !th->isRunning(); }, [&progress]() { return progress; });
}
th->deleteLater();
@@ -1974,7 +1975,6 @@ void CaptureContext::LoadEdits(const QString &data)
auto replaceSaveCallback = [this](ICaptureContext *ctx, IShaderViewer *viewer, ResourceId id,
ShaderStage stage, ShaderEncoding shaderEncoding,
ShaderCompileFlags flags, rdcstr entryFunc, bytebuf shaderBytes) {
-
ApplyShaderEdit(viewer, id, stage, shaderEncoding, flags, entryFunc, shaderBytes);
};
@@ -1984,14 +1984,14 @@ void CaptureContext::LoadEdits(const QString &data)
for(QVariant e : editors)
{
- ShaderViewer *edit =
- ShaderViewer::LoadEditor(*this, e.toMap(), replaceSaveCallback, replaceRevertCallback,
- [this](ShaderViewer *view, bool closed) {
- SetModification(CaptureModifications::EditedShaders);
- if(closed)
- m_ShaderEditors.removeOne(view);
- },
- m_MainWindow->Widget());
+ ShaderViewer *edit = ShaderViewer::LoadEditor(
+ *this, e.toMap(), replaceSaveCallback, replaceRevertCallback,
+ [this](ShaderViewer *view, bool closed) {
+ SetModification(CaptureModifications::EditedShaders);
+ if(closed)
+ m_ShaderEditors.removeOne(view);
+ },
+ m_MainWindow->Widget());
if(edit)
{
@@ -2469,10 +2469,9 @@ IShaderViewer *CaptureContext::EditShader(ResourceId id, ShaderStage stage, cons
if(id != ResourceId())
{
auto replaceSaveCallback = [this, saveCallback](
- ICaptureContext *ctx, IShaderViewer *viewer, ResourceId id, ShaderStage stage,
- ShaderEncoding shaderEncoding, ShaderCompileFlags flags, rdcstr entryFunc,
- bytebuf shaderBytes) {
-
+ ICaptureContext *ctx, IShaderViewer *viewer, ResourceId id,
+ ShaderStage stage, ShaderEncoding shaderEncoding,
+ ShaderCompileFlags flags, rdcstr entryFunc, bytebuf shaderBytes) {
ApplyShaderEdit(viewer, id, stage, shaderEncoding, flags, entryFunc, shaderBytes);
if(saveCallback)
@@ -2487,14 +2486,15 @@ IShaderViewer *CaptureContext::EditShader(ResourceId id, ShaderStage stage, cons
revertCallback(ctx, view, id);
};
- viewer = ShaderViewer::EditShader(*this, id, stage, entryPoint, files, knownTool, shaderEncoding,
- flags, replaceSaveCallback, replaceRevertCallback,
- [this](ShaderViewer *view, bool closed) {
- SetModification(CaptureModifications::EditedShaders);
- if(closed)
- m_ShaderEditors.removeOne(view);
- },
- m_MainWindow->Widget());
+ viewer = ShaderViewer::EditShader(
+ *this, id, stage, entryPoint, files, knownTool, shaderEncoding, flags, replaceSaveCallback,
+ replaceRevertCallback,
+ [this](ShaderViewer *view, bool closed) {
+ SetModification(CaptureModifications::EditedShaders);
+ if(closed)
+ m_ShaderEditors.removeOne(view);
+ },
+ m_MainWindow->Widget());
m_ShaderEditors.push_back(viewer);
SetModification(CaptureModifications::EditedShaders);
diff --git a/qrenderdoc/Code/Interface/ShaderProcessingTool.cpp b/qrenderdoc/Code/Interface/ShaderProcessingTool.cpp
index bec700ffd..4bd4684b2 100644
--- a/qrenderdoc/Code/Interface/ShaderProcessingTool.cpp
+++ b/qrenderdoc/Code/Interface/ShaderProcessingTool.cpp
@@ -163,9 +163,9 @@ static ShaderToolOutput RunTool(const ShaderProcessingTool &tool, QWidget *windo
thread->start();
- ShowProgressDialog(window, QApplication::translate("ShaderProcessingTool",
- "Please wait - running external tool"),
- [thread]() { return !thread->isRunning(); });
+ ShowProgressDialog(
+ window, QApplication::translate("ShaderProcessingTool", "Please wait - running external tool"),
+ [thread]() { return !thread->isRunning(); });
thread->deleteLater();
diff --git a/qrenderdoc/Code/QRDUtils.cpp b/qrenderdoc/Code/QRDUtils.cpp
index 3ff5d8257..d271a5f8b 100644
--- a/qrenderdoc/Code/QRDUtils.cpp
+++ b/qrenderdoc/Code/QRDUtils.cpp
@@ -2574,8 +2574,7 @@ class RDProgressDialog : public QProgressDialog
public:
RDProgressDialog(const QString &labelText, QWidget *parent)
// we add 1 so that the progress value never hits maximum until we are actually finished
- : QProgressDialog(labelText, QString(), 0, maxProgress + 1, parent),
- m_Label(this)
+ : QProgressDialog(labelText, QString(), 0, maxProgress + 1, parent), m_Label(this)
{
setWindowTitle(tr("Please Wait"));
setWindowFlags(Qt::CustomizeWindowHint | Qt::Dialog | Qt::WindowTitleHint);
@@ -2743,12 +2742,17 @@ bool RunProcessAsAdmin(const QString &fullExecutablePath, const QStringList &par
#else
// try to find a way to run the application elevated.
const QString graphicalSudo[] = {
- lit("kdesudo"), lit("gksudo"), lit("beesu"),
+ lit("kdesudo"),
+ lit("gksudo"),
+ lit("beesu"),
};
// if none of the graphical options, then look for sudo and either
const QString termEmulator[] = {
- lit("x-terminal-emulator"), lit("gnome-terminal"), lit("konsole"), lit("xterm"),
+ lit("x-terminal-emulator"),
+ lit("gnome-terminal"),
+ lit("konsole"),
+ lit("xterm"),
};
for(const QString &sudo : graphicalSudo)
@@ -2840,8 +2844,8 @@ void RevealFilenameInExternalFileBrowser(const QString &filePath)
{
#if defined(Q_OS_WIN32)
// on windows we can ask explorer to highlight the exact file.
- QProcess::startDetached(lit("explorer.exe"), QStringList() << lit("/select,")
- << QDir::toNativeSeparators(filePath));
+ QProcess::startDetached(lit("explorer.exe"),
+ QStringList() << lit("/select,") << QDir::toNativeSeparators(filePath));
#else
// on all other platforms, we just use QDesktopServices to invoke the external file browser on the
// directory and hope that's close enough.
diff --git a/qrenderdoc/Code/QRDUtils.h b/qrenderdoc/Code/QRDUtils.h
index e660aba3b..8734eafcd 100644
--- a/qrenderdoc/Code/QRDUtils.h
+++ b/qrenderdoc/Code/QRDUtils.h
@@ -110,7 +110,9 @@ struct Rules
switch(config)
{
- case std140: { break;
+ case std140:
+ {
+ break;
}
case std430:
{
diff --git a/qrenderdoc/Code/ReplayManager.cpp b/qrenderdoc/Code/ReplayManager.cpp
index 851c16c0d..a1a96aa12 100644
--- a/qrenderdoc/Code/ReplayManager.cpp
+++ b/qrenderdoc/Code/ReplayManager.cpp
@@ -190,8 +190,9 @@ rdcstr ReplayManager::CopyCaptureToRemote(const rdcstr &localpath, QWidget *wind
thread->start();
}
- ShowProgressDialog(window, tr("Transferring..."), [&copied]() { return copied == 1; },
- [&progress]() { return progress; });
+ ShowProgressDialog(
+ window, tr("Transferring..."), [&copied]() { return copied == 1; },
+ [&progress]() { return progress; });
return remotepath;
}
@@ -224,8 +225,9 @@ void ReplayManager::CopyCaptureFromRemote(const rdcstr &remotepath, const rdcstr
thread->start();
}
- ShowProgressDialog(window, tr("Transferring..."), [&copied]() { return copied == 1; },
- [&progress]() { return progress; });
+ ShowProgressDialog(
+ window, tr("Transferring..."), [&copied]() { return copied == 1; },
+ [&progress]() { return progress; });
}
bool ReplayManager::IsRunning()
diff --git a/qrenderdoc/Code/Resources.h b/qrenderdoc/Code/Resources.h
index a37e9aca3..1d538fafb 100644
--- a/qrenderdoc/Code/Resources.h
+++ b/qrenderdoc/Code/Resources.h
@@ -122,9 +122,15 @@ public:
~Resources();
#undef RESOURCE_DEF
-#define RESOURCE_DEF(name, filename) \
- static const Resource &name() { return resources->name##_data; } \
- static const Resource &name##_2x() { return resources->name##_2x_data; }
+#define RESOURCE_DEF(name, filename) \
+ static const Resource &name() \
+ { \
+ return resources->name##_data; \
+ } \
+ static const Resource &name##_2x() \
+ { \
+ return resources->name##_2x_data; \
+ }
RESOURCE_LIST()
private:
@@ -152,7 +158,10 @@ struct Pixmaps
else \
return Resources::name##_2x().pixmap; \
} \
- static const QPixmap &name(QWidget *widget) { return name(widget->devicePixelRatio()); }
+ static const QPixmap &name(QWidget *widget) \
+ { \
+ return name(widget->devicePixelRatio()); \
+ }
RESOURCE_LIST()
};
@@ -160,6 +169,9 @@ struct Icons
{
#undef RESOURCE_DEF
#define RESOURCE_DEF(name, filename) \
- static const QIcon &name() { return Resources::name().icon; }
+ static const QIcon &name() \
+ { \
+ return Resources::name().icon; \
+ }
RESOURCE_LIST()
};
diff --git a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp
index 404751419..0dec8d261 100644
--- a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp
+++ b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp
@@ -910,7 +910,7 @@ void PythonContext::executeString(const QString &filename, const QString &source
{
PyObject *traceContext = PyDict_New();
- uintptr_t thisint = (uintptr_t) this;
+ uintptr_t thisint = (uintptr_t)this;
uint64_t thisuint64 = (uint64_t)thisint;
PyObject *thisobj = PyLong_FromUnsignedLongLong(thisuint64);
@@ -1007,9 +1007,10 @@ void PythonContext::setGlobal(const char *varName, const char *typeName, void *o
if(ret != 0)
{
- emit exception(lit("RuntimeError"), tr("Failed to set variable '%1' of type '%2'")
- .arg(QString::fromUtf8(varName))
- .arg(QString::fromUtf8(typeName)),
+ emit exception(lit("RuntimeError"),
+ tr("Failed to set variable '%1' of type '%2'")
+ .arg(QString::fromUtf8(varName))
+ .arg(QString::fromUtf8(typeName)),
-1, {});
return;
}
diff --git a/qrenderdoc/Code/pyrenderdoc/PythonContext.h b/qrenderdoc/Code/pyrenderdoc/PythonContext.h
index a1ba37bea..8e0765fb1 100644
--- a/qrenderdoc/Code/pyrenderdoc/PythonContext.h
+++ b/qrenderdoc/Code/pyrenderdoc/PythonContext.h
@@ -86,9 +86,10 @@ public:
if(obj)
setPyGlobal(varName, obj);
else
- emit exception(lit("RuntimeError"), tr("Failed to set variable '%1' of type '%2'")
- .arg(QString::fromUtf8(varName))
- .arg(QString::fromUtf8(typeName)),
+ emit exception(lit("RuntimeError"),
+ tr("Failed to set variable '%1' of type '%2'")
+ .arg(QString::fromUtf8(varName))
+ .arg(QString::fromUtf8(typeName)),
-1, {});
}
diff --git a/qrenderdoc/Code/qrenderdoc.cpp b/qrenderdoc/Code/qrenderdoc.cpp
index 9c227a037..5745b0a61 100644
--- a/qrenderdoc/Code/qrenderdoc.cpp
+++ b/qrenderdoc/Code/qrenderdoc.cpp
@@ -633,7 +633,6 @@ int main(int argc, char *argv[])
QObject::connect(
&py.ctx(), &PythonContext::exception,
[&pythonExited](const QString &type, const QString &value, int, QList frames) {
-
if(type == lit("SystemExit"))
{
pythonExited = true;
diff --git a/qrenderdoc/Styles/RDStyle/RDStyle.cpp b/qrenderdoc/Styles/RDStyle/RDStyle.cpp
index cc0a70753..15a652721 100644
--- a/qrenderdoc/Styles/RDStyle/RDStyle.cpp
+++ b/qrenderdoc/Styles/RDStyle/RDStyle.cpp
@@ -414,9 +414,8 @@ QRect RDStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
(scroll->pageStep * ret.width()) / (range + scroll->pageStep));
slider.setWidth(qMin(slider.width(), sliderSize));
- slider.moveLeft(ret.left() +
- (qreal(scroll->sliderPosition) / qreal(range)) *
- (ret.width() - slider.width()));
+ slider.moveLeft(ret.left() + (qreal(scroll->sliderPosition) / qreal(range)) *
+ (ret.width() - slider.width()));
}
else
{
@@ -452,9 +451,8 @@ QRect RDStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
(scroll->pageStep * ret.height()) / (range + scroll->pageStep));
slider.setHeight(qMin(slider.height(), sliderSize));
- slider.moveTop(ret.top() +
- (qreal(scroll->sliderPosition) / qreal(range)) *
- (ret.height() - slider.height()));
+ slider.moveTop(ret.top() + (qreal(scroll->sliderPosition) / qreal(range)) *
+ (ret.height() - slider.height()));
}
else
{
diff --git a/qrenderdoc/Widgets/CustomPaintWidget.cpp b/qrenderdoc/Widgets/CustomPaintWidget.cpp
index acd2d27df..ffa64cd72 100644
--- a/qrenderdoc/Widgets/CustomPaintWidget.cpp
+++ b/qrenderdoc/Widgets/CustomPaintWidget.cpp
@@ -46,7 +46,7 @@ CustomPaintWidgetInternal::~CustomPaintWidgetInternal()
CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
{
- m_Tag = QFormatStr("custompaint%1").arg((uintptr_t) this);
+ m_Tag = QFormatStr("custompaint%1").arg((uintptr_t)this);
setAttribute(Qt::WA_OpaquePaintEvent);
diff --git a/qrenderdoc/Widgets/Extended/RDTextEdit.cpp b/qrenderdoc/Widgets/Extended/RDTextEdit.cpp
index 2cb01d9e1..6f18ac050 100644
--- a/qrenderdoc/Widgets/Extended/RDTextEdit.cpp
+++ b/qrenderdoc/Widgets/Extended/RDTextEdit.cpp
@@ -126,8 +126,9 @@ void RDTextEdit::enableCompletion()
// if we're in the middle of a word, move to the end of it
QString text = toPlainText();
- if(cur.position() > 0 && (text[cur.position() - 1].isLetterOrNumber() ||
- m_WordCharacters.contains(text[cur.position() - 1])) &&
+ if(cur.position() > 0 &&
+ (text[cur.position() - 1].isLetterOrNumber() ||
+ m_WordCharacters.contains(text[cur.position() - 1])) &&
(text[cur.position()].isLetterOrNumber() ||
m_WordCharacters.contains(text[cur.position()])))
{
@@ -200,9 +201,7 @@ void RDTextEdit::keyPressEvent(QKeyEvent *e)
case Qt::Key_Enter:
case Qt::Key_Tab:
case Qt::Key_Backtab:
- case Qt::Key_Escape:
- e->ignore();
- return;
+ case Qt::Key_Escape: e->ignore(); return;
// also the completer doesn't hide itself when the cursor is moved so make sure we do that
// ourselves
diff --git a/qrenderdoc/Widgets/Extended/RDTreeWidget.cpp b/qrenderdoc/Widgets/Extended/RDTreeWidget.cpp
index 76e384c66..1c2897765 100644
--- a/qrenderdoc/Widgets/Extended/RDTreeWidget.cpp
+++ b/qrenderdoc/Widgets/Extended/RDTreeWidget.cpp
@@ -320,7 +320,6 @@ void RDTreeWidgetItem::sort(int column, Qt::SortOrder order)
std::stable_sort(m_children.begin(), m_children.end(),
[ctx, column, order](const RDTreeWidgetItem *a, const RDTreeWidgetItem *b) {
-
if(a->treeWidget()->m_SortComparison)
return a->treeWidget()->m_SortComparison(column, order, a, b);
diff --git a/qrenderdoc/Windows/BufferViewer.cpp b/qrenderdoc/Windows/BufferViewer.cpp
index 95ffe0775..965e485c2 100644
--- a/qrenderdoc/Windows/BufferViewer.cpp
+++ b/qrenderdoc/Windows/BufferViewer.cpp
@@ -2270,8 +2270,7 @@ BufferViewer::BufferViewer(ICaptureContext &ctx, bool meshview, QWidget *parent)
ui->matrixType->addItems({tr("Perspective"), tr("Orthographic")});
ui->axisMappingCombo->addItems({tr("Y-up, left handed"), tr("Y-up, right handed"),
- tr("Z-up, left handed"), tr("Z-up, right handed"),
- tr("Custom...")});
+ tr("Z-up, left handed"), tr("Z-up, right handed"), tr("Custom...")});
ui->axisMappingCombo->setCurrentIndex(0);
// wireframe only available on solid shaded options
diff --git a/qrenderdoc/Windows/CommentView.cpp b/qrenderdoc/Windows/CommentView.cpp
index af953097e..941f053fe 100644
--- a/qrenderdoc/Windows/CommentView.cpp
+++ b/qrenderdoc/Windows/CommentView.cpp
@@ -53,7 +53,6 @@ CommentView::CommentView(ICaptureContext &ctx, QWidget *parent)
QObject::connect(
m_commentsEditor, &ScintillaEdit::modified,
[this](int type, int position, int length, int, const QByteArray &, int, int, int) {
-
// if there has been a change, restyle the region around the modification. We can't use just
// word boundaries so search back to the last whitespace character - this means we will
// restyle at most a line, likely much less.
diff --git a/qrenderdoc/Windows/Dialogs/AxisMappingDialog.cpp b/qrenderdoc/Windows/Dialogs/AxisMappingDialog.cpp
index e21cea550..10c0e0ff9 100644
--- a/qrenderdoc/Windows/Dialogs/AxisMappingDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/AxisMappingDialog.cpp
@@ -154,8 +154,7 @@ void AxisMappingDialog::setNewAxisMapping()
duplicateDirection = zDirection;
}
- const QStringList directions = {tr("left/right"), tr("up/down"),
- tr("into screen/out of screen")};
+ const QStringList directions = {tr("left/right"), tr("up/down"), tr("into screen/out of screen")};
QString messageText;
if(allAxesDegenerate)
diff --git a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp
index fca0366f5..b56f1b4a0 100644
--- a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp
@@ -568,7 +568,6 @@ void CaptureDialog::CheckAndroidSetup(QString &filename)
ui->androidWarn->setVisible(false);
LambdaThread *scan = new LambdaThread([this, filename]() {
-
rdcstr host = m_Ctx.Replay().CurrentRemote().Hostname();
RENDERDOC_CheckAndroidPackage(host, filename, &m_AndroidFlags);
diff --git a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp
index 72f1bf53f..363dccfb0 100644
--- a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp
@@ -314,12 +314,13 @@ void CrashDialog::on_send_clicked()
// confirm if the user REALLY wants to upload their capture
if(ui->captureUpload->isChecked())
{
- QMessageBox::StandardButton result = RDDialog::question(
- this, tr("Are you sure?"), tr("Uploading your capture file will send it privately to the "
- "RenderDoc server where I can "
- "use it to reproduce your problem.\n\nAre you sure you are "
- "OK with sending the capture "
- "securely to RenderDoc's website?"));
+ QMessageBox::StandardButton result =
+ RDDialog::question(this, tr("Are you sure?"),
+ tr("Uploading your capture file will send it privately to the "
+ "RenderDoc server where I can "
+ "use it to reproduce your problem.\n\nAre you sure you are "
+ "OK with sending the capture "
+ "securely to RenderDoc's website?"));
if(result != QMessageBox::Yes)
{
@@ -498,7 +499,6 @@ void CrashDialog::sendReport()
});
QObject::connect(m_Request, &QNetworkReply::finished, [this]() {
-
// don't do anything if we're finished after an error
if(ui->uploadRetry->isEnabled())
return;
diff --git a/qrenderdoc/Windows/Dialogs/EnvironmentEditor.cpp b/qrenderdoc/Windows/Dialogs/EnvironmentEditor.cpp
index 91b6d79cc..210603806 100644
--- a/qrenderdoc/Windows/Dialogs/EnvironmentEditor.cpp
+++ b/qrenderdoc/Windows/Dialogs/EnvironmentEditor.cpp
@@ -68,7 +68,9 @@ EnvironmentEditor::EnvironmentEditor(QWidget *parent)
QObject::connect(ui->appendValue, &QRadioButton::toggled, separatorLambda);
ui->separator->addItems({
- ToQStr(EnvSep::Platform), ToQStr(EnvSep::SemiColon), ToQStr(EnvSep::Colon),
+ ToQStr(EnvSep::Platform),
+ ToQStr(EnvSep::SemiColon),
+ ToQStr(EnvSep::Colon),
ToQStr(EnvSep::NoSep),
});
diff --git a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp
index a8c04eac2..ade668ead 100644
--- a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp
+++ b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp
@@ -868,9 +868,10 @@ bool LiveCapture::saveCapture(Capture *cap, QString path)
if(QString(m_Ctx.GetCaptureFilename()) == path)
{
- RDDialog::critical(this, tr("Cannot save"), tr("Can't overwrite currently open capture at %1\n"
- "Close the capture or save to another location.")
- .arg(path));
+ RDDialog::critical(this, tr("Cannot save"),
+ tr("Can't overwrite currently open capture at %1\n"
+ "Close the capture or save to another location.")
+ .arg(path));
return false;
}
@@ -1370,7 +1371,6 @@ void LiveCapture::connectionThreadEntry()
{
float progress = msg.capProgress;
GUIInvoke::call(this, [this, progress]() {
-
if(progress >= 0.0f && progress < 1.0f)
{
ui->progressLabel->setText(tr("Capture in Progress:"));
@@ -1384,7 +1384,6 @@ void LiveCapture::connectionThreadEntry()
ui->progressLabel->setVisible(false);
ui->progressBar->setVisible(false);
}
-
});
}
diff --git a/qrenderdoc/Windows/Dialogs/RemoteManager.cpp b/qrenderdoc/Windows/Dialogs/RemoteManager.cpp
index 8a751e488..9cec57cb6 100644
--- a/qrenderdoc/Windows/Dialogs/RemoteManager.cpp
+++ b/qrenderdoc/Windows/Dialogs/RemoteManager.cpp
@@ -222,7 +222,7 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
// this function looks up the remote connections and for each one open
// queries it for the API, target (usually executable name) and if any user is already connected
- LambdaThread *th = new LambdaThread([ this, node, h = host ]() {
+ LambdaThread *th = new LambdaThread([this, node, h = host]() {
QByteArray username = GetSystemUsername().toUtf8();
// make a mutable copy and check the status
diff --git a/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp b/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp
index 7b11cb855..c04710586 100644
--- a/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp
@@ -1030,8 +1030,8 @@ void SettingsDialog::on_editShaderTool_clicked()
{
ui->shaderTools->setItem(row, 0, new QTableWidgetItem(tool.name));
ui->shaderTools->setItem(
- row, 1, new QTableWidgetItem(
- QFormatStr("%1 -> %2").arg(ToQStr(tool.input)).arg(ToQStr(tool.output))));
+ row, 1,
+ new QTableWidgetItem(QFormatStr("%1 -> %2").arg(ToQStr(tool.input)).arg(ToQStr(tool.output))));
m_Ctx.Config().ShaderProcessors[row] = tool;
m_Ctx.Config().Save();
}
diff --git a/qrenderdoc/Windows/Dialogs/UpdateDialog.cpp b/qrenderdoc/Windows/Dialogs/UpdateDialog.cpp
index d9e609450..0146cfb3b 100644
--- a/qrenderdoc/Windows/Dialogs/UpdateDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/UpdateDialog.cpp
@@ -116,11 +116,12 @@ void UpdateDialog::on_close_clicked()
void UpdateDialog::on_update_clicked()
{
- QMessageBox::StandardButton res = RDDialog::question(
- this, tr("RenderDoc Update"), tr("This will close RenderDoc immediately - if you have any "
- "unsaved work, save it first!\n"
- "Continue?"),
- QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
+ QMessageBox::StandardButton res =
+ RDDialog::question(this, tr("RenderDoc Update"),
+ tr("This will close RenderDoc immediately - if you have any "
+ "unsaved work, save it first!\n"
+ "Continue?"),
+ QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if(res == QMessageBox::Yes)
{
@@ -199,7 +200,6 @@ void UpdateDialog::on_update_clicked()
});
QObject::connect(req, &QNetworkReply::finished, [this, req]() {
-
// don't do anything if we're finished after an error
if(ui->update->isEnabled())
return;
@@ -252,7 +252,6 @@ void UpdateDialog::on_update_clicked()
QStringList() << lit("upgrade") << lit("--path") << appDir.absolutePath(), NULL, true);
exit(0);
-
});
}
}
diff --git a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp
index d931961df..c98063f87 100644
--- a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp
+++ b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp
@@ -312,7 +312,9 @@ public:
{
switch(index.column())
{
- case 0: { return node->file.filename;
+ case 0:
+ {
+ return node->file.filename;
}
case 1:
{
@@ -458,37 +460,38 @@ private:
if(!(node->file.flags & PathProperty::Directory))
return;
- Renderer.ListFolder(makePath(node), true, [node](const rdcstr &path,
- const rdcarray &files) {
- if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
- {
- node->file.flags |= PathProperty::ErrorAccessDenied;
- return;
- }
+ Renderer.ListFolder(
+ makePath(node), true, [node](const rdcstr &path, const rdcarray &files) {
+ if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
+ {
+ node->file.flags |= PathProperty::ErrorAccessDenied;
+ return;
+ }
- QVector sortedFiles;
- sortedFiles.reserve(files.count());
- for(const PathEntry &f : files)
- sortedFiles.push_back(f);
+ QVector sortedFiles;
+ sortedFiles.reserve(files.count());
+ for(const PathEntry &f : files)
+ sortedFiles.push_back(f);
- std::sort(sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) {
- // sort greater than so that files with the flag are sorted before those without
- if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory))
- return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory);
+ std::sort(
+ sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) {
+ // sort greater than so that files with the flag are sorted before those without
+ if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory))
+ return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory);
- return strcmp(a.filename.c_str(), b.filename.c_str()) < 0;
- });
+ return strcmp(a.filename.c_str(), b.filename.c_str()) < 0;
+ });
- for(int i = 0; i < sortedFiles.count(); i++)
- {
- FSNode *child = new FSNode();
- child->parent = node;
- child->parentIndex = i;
- child->file = sortedFiles[i];
- child->populated = !(child->file.flags & PathProperty::Directory);
- node->children.push_back(child);
- }
- });
+ for(int i = 0; i < sortedFiles.count(); i++)
+ {
+ FSNode *child = new FSNode();
+ child->parent = node;
+ child->parentIndex = i;
+ child->file = sortedFiles[i];
+ child->populated = !(child->file.flags & PathProperty::Directory);
+ node->children.push_back(child);
+ }
+ });
}
};
diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp
index 00223242d..f2107f4a6 100644
--- a/qrenderdoc/Windows/EventBrowser.cpp
+++ b/qrenderdoc/Windows/EventBrowser.cpp
@@ -1422,13 +1422,13 @@ public:
#define STRINGIZE(a) STRINGIZE2(a)
#endif
-#define MAKE_BUILTIN_FILTER(filter_name) \
- m_BuiltinFilters[lit(STRINGIZE(filter_name))].makeFilter = [this]( \
- QString name, QString parameters, ParseTrace &trace) { \
- return filterFunction_##filter_name(name, parameters, trace); \
- }; \
- m_BuiltinFilters[lit(STRINGIZE(filter_name))].description = \
- filterDescription_##filter_name().trimmed();
+#define MAKE_BUILTIN_FILTER(filter_name) \
+ m_BuiltinFilters[lit(STRINGIZE(filter_name))].makeFilter = \
+ [this](QString name, QString parameters, ParseTrace &trace) { \
+ return filterFunction_##filter_name(name, parameters, trace); \
+ }; \
+ m_BuiltinFilters[lit(STRINGIZE(filter_name))].description = \
+ filterDescription_##filter_name().trimmed();
MAKE_BUILTIN_FILTER(regex);
MAKE_BUILTIN_FILTER(param);
@@ -1514,15 +1514,13 @@ public:
{
if(m_BuiltinFilters.contains(name))
{
- qCritical() << "Registering filter function" << QString(name)
- << "which is a builtin function.";
+ qCritical() << "Registering filter function" << QString(name) << "which is a builtin function.";
return false;
}
if(m_CustomFilters[name].filter != NULL)
{
- qCritical() << "Registering filter function" << QString(name)
- << "which is already registered.";
+ qCritical() << "Registering filter function" << QString(name) << "which is already registered.";
return false;
}
@@ -1818,7 +1816,6 @@ searched for as a case-insensitive substring.
return RichResourceTextFormat(*ctx, SDObject2Variant(o, false))
.contains(paramValue, Qt::CaseInsensitive);
}
-
};
}
@@ -2018,10 +2015,21 @@ and these can be queried with a filter such as $action(flags & Clear|Clear
if(tokens.size() <= 1)
return {
- "EID", "actionId", "numIndices",
+ "EID",
+ "actionId",
+ "numIndices",
// most aliases we don't autocomplete but this one we leave
- "numVertices", "numInstances", "baseVertex", "indexOffset", "vertexOffset",
- "instanceOffset", "dispatchX", "dispatchY", "dispatchZ", "dispatchSize", "duration",
+ "numVertices",
+ "numInstances",
+ "baseVertex",
+ "indexOffset",
+ "vertexOffset",
+ "instanceOffset",
+ "dispatchX",
+ "dispatchY",
+ "dispatchZ",
+ "dispatchSize",
+ "duration",
"flags",
};
@@ -2073,14 +2081,19 @@ and these can be queried with a filter such as $action(flags & Clear|Clear
}
static const NamedProp namedProps[] = {
- NAMED_PROP("eventid", action->eventId), NAMED_PROP("eid", action->eventId),
- NAMED_PROP("actionid", action->actionId), NAMED_PROP("numindices", action->numIndices),
- NAMED_PROP("numindexes", action->numIndices), NAMED_PROP("numvertices", action->numIndices),
- NAMED_PROP("numvertexes", action->numIndices), NAMED_PROP("indexcount", action->numIndices),
+ NAMED_PROP("eventid", action->eventId),
+ NAMED_PROP("eid", action->eventId),
+ NAMED_PROP("actionid", action->actionId),
+ NAMED_PROP("numindices", action->numIndices),
+ NAMED_PROP("numindexes", action->numIndices),
+ NAMED_PROP("numvertices", action->numIndices),
+ NAMED_PROP("numvertexes", action->numIndices),
+ NAMED_PROP("indexcount", action->numIndices),
NAMED_PROP("vertexcount", action->numIndices),
NAMED_PROP("numinstances", action->numInstances),
NAMED_PROP("instancecount", action->numInstances),
- NAMED_PROP("basevertex", action->baseVertex), NAMED_PROP("indexoffset", action->indexOffset),
+ NAMED_PROP("basevertex", action->baseVertex),
+ NAMED_PROP("indexoffset", action->indexOffset),
NAMED_PROP("vertexoffset", action->vertexOffset),
NAMED_PROP("instanceoffset", action->instanceOffset),
NAMED_PROP("dispatchx", action->dispatchDimension[0]),
@@ -2183,7 +2196,10 @@ and these can be queried with a filter such as $action(flags & Clear|Clear
{
// deliberately don't allow equality/inequality
static const QStringList operators = {
- lit("<"), lit(">"), lit("<="), lit(">="),
+ lit("<"),
+ lit(">"),
+ lit("<="),
+ lit(">="),
};
int operatorIdx = tokens.size() > 1 ? operators.indexOf(tokens[1].text) : -1;
@@ -2407,13 +2423,15 @@ Otherwise the event is included if it's a dispatch AND if the condition is true.
};
static const NamedProp namedProps[] = {
- NAMED_PROP("eventid", action->eventId), NAMED_PROP("eid", action->eventId),
+ NAMED_PROP("eventid", action->eventId),
+ NAMED_PROP("eid", action->eventId),
NAMED_PROP("actionid", action->actionId),
NAMED_PROP("dispatchx", action->dispatchDimension[0]),
NAMED_PROP("dispatchy", action->dispatchDimension[1]),
NAMED_PROP("dispatchz", action->dispatchDimension[2]),
NAMED_PROP("x", action->dispatchDimension[0]),
- NAMED_PROP("y", action->dispatchDimension[1]), NAMED_PROP("z", action->dispatchDimension[2]),
+ NAMED_PROP("y", action->dispatchDimension[1]),
+ NAMED_PROP("z", action->dispatchDimension[2]),
NAMED_PROP("dispatchsize", action->dispatchDimension[0] * action->dispatchDimension[1] *
action->dispatchDimension[2]),
NAMED_PROP("size", action->dispatchDimension[0] * action->dispatchDimension[1] *
@@ -2513,7 +2531,10 @@ Otherwise the event is included if it's a dispatch AND if the condition is true.
{
// deliberately don't allow equality/inequality
static const QStringList operators = {
- lit("<"), lit(">"), lit("<="), lit(">="),
+ lit("<"),
+ lit(">"),
+ lit("<="),
+ lit(">="),
};
int operatorIdx = tokens.size() > 1 ? operators.indexOf(tokens[1].text) : -1;
@@ -4265,7 +4286,8 @@ strings. These are documented on the left here, but for example
will include any action that matches "Indexed" as a plain string match, OR
is an action which renders more than 1000 indices.
-)EOD").trimmed());
+)EOD")
+ .trimmed());
}
else if(f == lit("Literal String"))
{
@@ -4285,7 +4307,8 @@ or whitespace, will be case-insensitively matched against the event name. Note t
this doesn't include all parameters, only those that appear in the name summary.
For searching arbitrary parameters consider using the $param() function.
-)EOD").trimmed());
+)EOD")
+ .trimmed());
}
else
{
diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp
index fec824c79..ce5a5b91c 100644
--- a/qrenderdoc/Windows/MainWindow.cpp
+++ b/qrenderdoc/Windows/MainWindow.cpp
@@ -657,7 +657,6 @@ void MainWindow::OnCaptureTrigger(const QString &exe, const QString &workingDir,
return;
LambdaThread *th = new LambdaThread([this, exe, workingDir, cmdLine, env, opts, callback]() {
-
if(isUnshareableDeviceInUse())
{
RDDialog::warning(this, tr("RenderDoc is already capturing an app on this device"),
@@ -673,7 +672,6 @@ void MainWindow::OnCaptureTrigger(const QString &exe, const QString &workingDir,
m_Ctx.Replay().ExecuteAndInject(exe, workingDir, cmdLine, env, capturefile, opts);
GUIInvoke::call(this, [this, exe, ret, callback]() {
-
if(ret.result.code == ResultCode::JDWPFailure)
{
RDDialog::critical(
@@ -733,7 +731,6 @@ void MainWindow::OnInjectTrigger(uint32_t PID, const rdcarraysetText(tr("Checking remote server status..."));
- LambdaThread *th = new LambdaThread([ this, h = host ]() {
+ LambdaThread *th = new LambdaThread([this, h = host]() {
// make a mutable copy and see if the server is up
RemoteHost host = h;
host.CheckStatus();
@@ -2037,7 +2034,6 @@ void MainWindow::setRemoteHost(int hostIdx)
if(host.Protocol() && host.IsVersionMismatch())
{
GUIInvoke::blockcall(this, [this, &host]() {
-
QMessageBox::StandardButton res =
RDDialog::question(this, tr("Unsupported version"),
tr("Remote server on %1 has an incompatible version.\n"
@@ -2563,8 +2559,9 @@ void MainWindow::on_action_Resolve_Symbols_triggered()
finished = true;
});
- ShowProgressDialog(this, tr("Resolving symbols, please wait..."),
- [&finished]() { return finished; }, [&progress]() { return progress; });
+ ShowProgressDialog(
+ this, tr("Resolving symbols, please wait..."), [&finished]() { return finished; },
+ [&progress]() { return progress; });
if(m_Ctx.HasAPIInspector())
m_Ctx.GetAPIInspector()->Refresh();
@@ -2635,9 +2632,8 @@ void MainWindow::on_action_Start_Replay_Loop_triggered()
else
{
popup.resize(100, 100);
- popup.setWindowTitle(tr("Looping replay of %1 Displaying %2")
- .arg(m_Ctx.GetCaptureFilename())
- .arg(tr("nothing")));
+ popup.setWindowTitle(
+ tr("Looping replay of %1 Displaying %2").arg(m_Ctx.GetCaptureFilename()).arg(tr("nothing")));
}
WindowingData winData = m_Ctx.CreateWindowingData(&popup);
@@ -2881,8 +2877,7 @@ void MainWindow::on_action_Check_for_Updates_triggered()
}
case UpdateResult::Latest:
{
- RDDialog::information(this, tr("Latest version"),
- tr("You are running the latest version."));
+ RDDialog::information(this, tr("Latest version"), tr("You are running the latest version."));
break;
}
case UpdateResult::Upgrade:
@@ -3141,7 +3136,7 @@ void MainWindow::showLaunchError(ResultDetails result)
" Or if this is a custom build check that all ABIs are built at the same version as "
"this program."
#endif
- );
+ );
break;
default:
message = tr("Error encountered launching RenderDoc remote server: %1.").arg(result.Message());
diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
index cd0a79760..35ce94115 100644
--- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
+++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
@@ -209,9 +209,8 @@ D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->iaLayouts->setHeader(header);
- ui->iaLayouts->setColumns({tr("Slot"), tr("Semantic"), tr("Index"), tr("Format"),
- tr("Input Slot"), tr("Offset"), tr("Class"), tr("Step Rate"),
- tr("Go")});
+ ui->iaLayouts->setColumns({tr("Slot"), tr("Semantic"), tr("Index"), tr("Format"), tr("Input Slot"),
+ tr("Offset"), tr("Class"), tr("Step Rate"), tr("Go")});
header->setColumnStretchHints({1, 4, 2, 3, 2, 2, 1, 1, -1});
ui->iaLayouts->setClearSelectionOnFocusLoss(true);
@@ -339,9 +338,8 @@ D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->targetOutputs->setHeader(header);
- ui->targetOutputs->setColumns({tr("Slot"), tr("Resource"), tr("Type"), tr("Width"),
- tr("Height"), tr("Depth"), tr("Array Size"), tr("Format"),
- tr("Go")});
+ ui->targetOutputs->setColumns({tr("Slot"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"),
+ tr("Depth"), tr("Array Size"), tr("Format"), tr("Go")});
header->setColumnStretchHints({2, 4, 2, 1, 1, 1, 1, 3, -1});
ui->targetOutputs->setHoverIconColumn(8, action, action_hover);
@@ -398,12 +396,25 @@ D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
ui->pipeFlow->setStages(
{
- lit("IA"), lit("VS"), lit("HS"), lit("DS"), lit("GS"), lit("RS"), lit("PS"), lit("OM"),
+ lit("IA"),
+ lit("VS"),
+ lit("HS"),
+ lit("DS"),
+ lit("GS"),
+ lit("RS"),
+ lit("PS"),
+ lit("OM"),
lit("CS"),
},
{
- tr("Input Assembler"), tr("Vertex Shader"), tr("Hull Shader"), tr("Domain Shader"),
- tr("Geometry Shader"), tr("Rasterizer"), tr("Pixel Shader"), tr("Output Merger"),
+ tr("Input Assembler"),
+ tr("Vertex Shader"),
+ tr("Hull Shader"),
+ tr("Domain Shader"),
+ tr("Geometry Shader"),
+ tr("Rasterizer"),
+ tr("Pixel Shader"),
+ tr("Output Merger"),
tr("Compute Shader"),
});
@@ -2546,8 +2557,9 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
}
m_Common.exportHTMLTable(
- xml, {tr("Slot"), tr("Semantic Name"), tr("Semantic Index"), tr("Format"), tr("Input Slot"),
- tr("Byte Offset"), tr("Per Instance"), tr("Instance Data Step Rate")},
+ xml,
+ {tr("Slot"), tr("Semantic Name"), tr("Semantic Index"), tr("Format"), tr("Input Slot"),
+ tr("Byte Offset"), tr("Per Instance"), tr("Instance Data Step Rate")},
rows);
}
@@ -2670,9 +2682,17 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
@@ -2695,9 +2715,17 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
@@ -2757,13 +2785,19 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
s.maxLOD == FLT_MAX ? lit("FLT_MAX") : QString::number(s.maxLOD), s.mipLODBias});
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Addressing"), tr("Border Colour"), tr("Comparison"), tr("Filter"),
- tr("Max Anisotropy"), tr("Min LOD"), tr("Max LOD"), tr("Mip Bias"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Addressing"),
+ tr("Border Colour"),
+ tr("Comparison"),
+ tr("Filter"),
+ tr("Max Anisotropy"),
+ tr("Min LOD"),
+ tr("Max LOD"),
+ tr("Mip Bias"),
+ },
+ rows);
}
{
@@ -2829,7 +2863,9 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Interface Name"), tr("Instance Name"),
+ tr("Slot"),
+ tr("Interface Name"),
+ tr("Instance Name"),
},
rows);
}
@@ -2885,13 +2921,13 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Scissor Enable"), tr("Line AA Enable"), tr("Multisample Enable"),
- tr("Forced Sample Count"), tr("Conservative Raster")},
+ xml,
+ {tr("Scissor Enable"), tr("Line AA Enable"), tr("Multisample Enable"),
+ tr("Forced Sample Count"), tr("Conservative Raster")},
{rs.state.scissorEnable ? tr("Yes") : tr("No"),
rs.state.antialiasedLines ? tr("Yes") : tr("No"),
rs.state.multisampleEnable ? tr("Yes") : tr("No"), rs.state.forcedSampleCount,
- rs.state.conservativeRasterization != ConservativeRaster::Disabled ? tr("Yes")
- : tr("No")});
+ rs.state.conservativeRasterization != ConservativeRaster::Disabled ? tr("Yes") : tr("No")});
xml.writeStartElement(lit("p"));
xml.writeEndElement();
@@ -2919,8 +2955,9 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"),
- tr("Min Depth"), tr("Max Depth"), tr("Enabled")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"),
+ tr("Min Depth"), tr("Max Depth"), tr("Enabled")},
rows);
}
@@ -2957,12 +2994,14 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
.arg(om.blendState.blendFactor[2], 0, 'f', 2)
.arg(om.blendState.blendFactor[3], 0, 'f', 2);
- m_Common.exportHTMLTable(xml, {tr("Independent Blend Enable"), tr("Alpha to Coverage"),
- tr("Sample Mask"), tr("Blend Factor")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Independent Blend Enable"), tr("Alpha to Coverage"),
+ tr("Sample Mask"), tr("Blend Factor")},
{
om.blendState.independentBlend ? tr("Yes") : tr("No"),
om.blendState.alphaToCoverage ? tr("Yes") : tr("No"),
- Formatter::Format(om.blendState.sampleMask, true), blendFactor,
+ Formatter::Format(om.blendState.sampleMask, true),
+ blendFactor,
});
xml.writeStartElement(lit("h3"));
@@ -2992,15 +3031,21 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
i++;
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Blend Enable"), tr("Logic Enable"), tr("Blend Source"),
- tr("Blend Destination"), tr("Blend Operation"), tr("Alpha Blend Source"),
- tr("Alpha Blend Destination"), tr("Alpha Blend Operation"), tr("Logic Operation"),
- tr("Write Mask"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Blend Enable"),
+ tr("Logic Enable"),
+ tr("Blend Source"),
+ tr("Blend Destination"),
+ tr("Blend Operation"),
+ tr("Alpha Blend Source"),
+ tr("Alpha Blend Destination"),
+ tr("Alpha Blend Operation"),
+ tr("Logic Operation"),
+ tr("Write Mask"),
+ },
+ rows);
}
{
@@ -3029,8 +3074,9 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
xml.writeStartElement(lit("p"));
xml.writeEndElement();
- m_Common.exportHTMLTable(xml, {tr("Face"), tr("Function"), tr("Pass Operation"),
- tr("Fail Operation"), tr("Depth Fail Operation")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Face"), tr("Function"), tr("Pass Operation"),
+ tr("Fail Operation"), tr("Depth Fail Operation")},
{
{tr("Front"), ToQStr(om.depthStencilState.frontFace.function),
ToQStr(om.depthStencilState.frontFace.passOperation),
@@ -3060,9 +3106,17 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
@@ -3092,9 +3146,17 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
@@ -3119,9 +3181,17 @@ void D3D11PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D11Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp
index 0a2d50254..6eee80584 100644
--- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp
+++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp
@@ -250,9 +250,8 @@ D3D12PipelineStateViewer::D3D12PipelineStateViewer(ICaptureContext &ctx,
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->iaLayouts->setHeader(header);
- ui->iaLayouts->setColumns({tr("Slot"), tr("Semantic"), tr("Index"), tr("Format"),
- tr("Input Slot"), tr("Offset"), tr("Class"), tr("Step Rate"),
- tr("Go")});
+ ui->iaLayouts->setColumns({tr("Slot"), tr("Semantic"), tr("Index"), tr("Format"), tr("Input Slot"),
+ tr("Offset"), tr("Class"), tr("Step Rate"), tr("Go")});
header->setColumnStretchHints({1, 4, 2, 3, 2, 2, 1, 1, -1});
ui->iaLayouts->setClearSelectionOnFocusLoss(true);
@@ -393,9 +392,8 @@ D3D12PipelineStateViewer::D3D12PipelineStateViewer(ICaptureContext &ctx,
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->targetOutputs->setHeader(header);
- ui->targetOutputs->setColumns({tr("Slot"), tr("Resource"), tr("Type"), tr("Width"),
- tr("Height"), tr("Depth"), tr("Array Size"), tr("Format"),
- tr("Go")});
+ ui->targetOutputs->setColumns({tr("Slot"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"),
+ tr("Depth"), tr("Array Size"), tr("Format"), tr("Go")});
header->setColumnStretchHints({2, 4, 2, 1, 1, 1, 1, 3, -1});
ui->targetOutputs->setHoverIconColumn(8, action, action_hover);
@@ -440,12 +438,25 @@ D3D12PipelineStateViewer::D3D12PipelineStateViewer(ICaptureContext &ctx,
ui->pipeFlow->setStages(
{
- lit("IA"), lit("VS"), lit("HS"), lit("DS"), lit("GS"), lit("RS"), lit("PS"), lit("OM"),
+ lit("IA"),
+ lit("VS"),
+ lit("HS"),
+ lit("DS"),
+ lit("GS"),
+ lit("RS"),
+ lit("PS"),
+ lit("OM"),
lit("CS"),
},
{
- tr("Input Assembler"), tr("Vertex Shader"), tr("Hull Shader"), tr("Domain Shader"),
- tr("Geometry Shader"), tr("Rasterizer"), tr("Pixel Shader"), tr("Output Merger"),
+ tr("Input Assembler"),
+ tr("Vertex Shader"),
+ tr("Hull Shader"),
+ tr("Domain Shader"),
+ tr("Geometry Shader"),
+ tr("Rasterizer"),
+ tr("Pixel Shader"),
+ tr("Output Merger"),
tr("Compute Shader"),
});
@@ -2087,11 +2098,14 @@ void D3D12PipelineStateViewer::setState()
if(state.outputMerger.depthStencilState.stencilEnable)
{
ui->stencils->addTopLevelItem(new RDTreeWidgetItem({
- tr("Front"), ToQStr(state.outputMerger.depthStencilState.frontFace.function),
+ tr("Front"),
+ ToQStr(state.outputMerger.depthStencilState.frontFace.function),
ToQStr(state.outputMerger.depthStencilState.frontFace.failOperation),
ToQStr(state.outputMerger.depthStencilState.frontFace.depthFailOperation),
- ToQStr(state.outputMerger.depthStencilState.frontFace.passOperation), QVariant(),
- QVariant(), QVariant(),
+ ToQStr(state.outputMerger.depthStencilState.frontFace.passOperation),
+ QVariant(),
+ QVariant(),
+ QVariant(),
}));
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 5,
@@ -2102,10 +2116,13 @@ void D3D12PipelineStateViewer::setState()
state.outputMerger.depthStencilState.frontFace.reference);
ui->stencils->addTopLevelItem(new RDTreeWidgetItem({
- tr("Back"), ToQStr(state.outputMerger.depthStencilState.backFace.function),
+ tr("Back"),
+ ToQStr(state.outputMerger.depthStencilState.backFace.function),
ToQStr(state.outputMerger.depthStencilState.backFace.failOperation),
ToQStr(state.outputMerger.depthStencilState.backFace.depthFailOperation),
- ToQStr(state.outputMerger.depthStencilState.backFace.passOperation), QVariant(), QVariant(),
+ ToQStr(state.outputMerger.depthStencilState.backFace.passOperation),
+ QVariant(),
+ QVariant(),
QVariant(),
}));
@@ -2693,8 +2710,9 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
}
m_Common.exportHTMLTable(
- xml, {tr("Slot"), tr("Semantic Name"), tr("Semantic Index"), tr("Format"), tr("Input Slot"),
- tr("Byte Offset"), tr("Per Instance"), tr("Instance Data Step Rate")},
+ xml,
+ {tr("Slot"), tr("Semantic Name"), tr("Semantic Index"), tr("Format"), tr("Input Slot"),
+ tr("Byte Offset"), tr("Per Instance"), tr("Instance Data Step Rate")},
rows);
}
@@ -3122,9 +3140,10 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Resource"), tr("View Type"),
- tr("Resource Type"), tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters")},
+ xml,
+ {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Resource"), tr("View Type"),
+ tr("Resource Type"), tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
+ tr("View Format"), tr("Resource Format"), tr("View Parameters")},
rowsRO);
xml.writeStartElement(lit("h3"));
@@ -3132,17 +3151,19 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Resource"), tr("View Type"),
- tr("Resource Type"), tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters")},
+ xml,
+ {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Resource"), tr("View Type"),
+ tr("Resource Type"), tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
+ tr("View Format"), tr("Resource Format"), tr("View Parameters")},
rowsRW);
xml.writeStartElement(lit("h3"));
xml.writeCharacters(tr("Samplers"));
xml.writeEndElement();
- m_Common.exportHTMLTable(xml, {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Addressing"),
- tr("Filter"), tr("LOD Clamp"), tr("LOD Bias")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Root Sig El"), tr("Space"), tr("Register"), tr("Addressing"),
+ tr("Filter"), tr("LOD Clamp"), tr("LOD Bias")},
rowsSampler);
xml.writeStartElement(lit("h3"));
@@ -3202,10 +3223,10 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
i++;
}
- m_Common.exportHTMLTable(
- xml, {tr("Slot"), tr("Buffer"), tr("Offset"), tr("Byte Length"), tr("Counter Buffer"),
- tr("Counter Offset"), tr("Counter Byte Length")},
- rows);
+ m_Common.exportHTMLTable(xml,
+ {tr("Slot"), tr("Buffer"), tr("Offset"), tr("Byte Length"),
+ tr("Counter Buffer"), tr("Counter Offset"), tr("Counter Byte Length")},
+ rows);
}
}
@@ -3224,8 +3245,9 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Line Rasteriztion"), tr("Forced Sample Count"), tr("Conservative Raster"),
- tr("Sample Mask")},
+ xml,
+ {tr("Line Rasteriztion"), tr("Forced Sample Count"), tr("Conservative Raster"),
+ tr("Sample Mask")},
{ToQStr(rs.state.lineRasterMode), rs.state.forcedSampleCount,
rs.state.conservativeRasterization != ConservativeRaster::Disabled ? tr("Yes") : tr("No"),
Formatter::Format(rs.sampleMask, true)});
@@ -3255,9 +3277,10 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"),
- tr("Min Depth"), tr("Max Depth")},
- rows);
+ m_Common.exportHTMLTable(
+ xml,
+ {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"), tr("Min Depth"), tr("Max Depth")},
+ rows);
}
{
@@ -3292,8 +3315,9 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
.arg(om.blendState.blendFactor[2], 0, 'f', 2)
.arg(om.blendState.blendFactor[3], 0, 'f', 2);
- m_Common.exportHTMLTable(xml, {tr("Independent Blend Enable"), tr("Alpha to Coverage"),
- tr("Blend Factor"), tr("Multisampling Rate")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Independent Blend Enable"), tr("Alpha to Coverage"),
+ tr("Blend Factor"), tr("Multisampling Rate")},
{om.blendState.independentBlend ? tr("Yes") : tr("No"),
om.blendState.alphaToCoverage ? tr("Yes") : tr("No"), blendFactor,
tr("%1x %2 qual").arg(om.multiSampleCount).arg(om.multiSampleQuality)});
@@ -3325,15 +3349,21 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
i++;
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Blend Enable"), tr("Logic Enable"), tr("Blend Source"),
- tr("Blend Destination"), tr("Blend Operation"), tr("Alpha Blend Source"),
- tr("Alpha Blend Destination"), tr("Alpha Blend Operation"), tr("Logic Operation"),
- tr("Write Mask"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Blend Enable"),
+ tr("Logic Enable"),
+ tr("Blend Source"),
+ tr("Blend Destination"),
+ tr("Blend Operation"),
+ tr("Alpha Blend Source"),
+ tr("Alpha Blend Destination"),
+ tr("Alpha Blend Operation"),
+ tr("Logic Operation"),
+ tr("Write Mask"),
+ },
+ rows);
}
{
@@ -3344,7 +3374,9 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
m_Common.exportHTMLTable(
xml,
{
- tr("Depth Test Enable"), tr("Depth Writes Enable"), tr("Depth Function"),
+ tr("Depth Test Enable"),
+ tr("Depth Writes Enable"),
+ tr("Depth Function"),
tr("Depth Bounds"),
},
{
@@ -3369,7 +3401,8 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
QList rows;
rows.push_back({
- tr("Front"), Formatter::Format(om.depthStencilState.frontFace.reference, true),
+ tr("Front"),
+ Formatter::Format(om.depthStencilState.frontFace.reference, true),
Formatter::Format(om.depthStencilState.frontFace.compareMask, true),
Formatter::Format(om.depthStencilState.frontFace.writeMask, true),
ToQStr(om.depthStencilState.frontFace.function),
@@ -3379,7 +3412,8 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
});
rows.push_back({
- tr("back"), Formatter::Format(om.depthStencilState.backFace.reference, true),
+ tr("back"),
+ Formatter::Format(om.depthStencilState.backFace.reference, true),
Formatter::Format(om.depthStencilState.backFace.compareMask, true),
Formatter::Format(om.depthStencilState.backFace.writeMask, true),
ToQStr(om.depthStencilState.backFace.function),
@@ -3421,9 +3455,17 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Name"), tr("View Type"), tr("Resource Type"),
- tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("View Format"), tr("Resource Format"), tr("View Parameters"),
+ tr("Slot"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
rows);
}
@@ -3444,9 +3486,16 @@ void D3D12PipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const D3D12Pipe
m_Common.exportHTMLTable(xml,
{
- tr("Name"), tr("View Type"), tr("Resource Type"), tr("Width"),
- tr("Height"), tr("Depth"), tr("Array Size"), tr("View Format"),
- tr("Resource Format"), tr("View Parameters"),
+ tr("Name"),
+ tr("View Type"),
+ tr("Resource Type"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("View Format"),
+ tr("Resource Format"),
+ tr("View Parameters"),
},
{exportViewHTML(om.depthTarget, false, NULL, extra)});
}
diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp
index 7cd143c8e..ef9f29756 100644
--- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp
+++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp
@@ -293,8 +293,7 @@ GLPipelineStateViewer::GLPipelineStateViewer(ICaptureContext &ctx, PipelineState
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->xfbBuffers->setHeader(header);
- ui->xfbBuffers->setColumns(
- {tr("Slot"), tr("Buffer"), tr("Byte Length"), tr("Offset"), tr("Go")});
+ ui->xfbBuffers->setColumns({tr("Slot"), tr("Buffer"), tr("Byte Length"), tr("Offset"), tr("Go")});
header->setColumnStretchHints({1, 4, 3, 2, -1});
header->setMinimumSectionSize(40);
@@ -323,8 +322,7 @@ GLPipelineStateViewer::GLPipelineStateViewer(ICaptureContext &ctx, PipelineState
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
ui->scissors->setHeader(header);
- ui->scissors->setColumns(
- {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"), tr("Enabled")});
+ ui->scissors->setColumns({tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"), tr("Enabled")});
header->setColumnStretchHints({-1, -1, -1, -1, -1, 1});
header->setMinimumSectionSize(40);
@@ -378,13 +376,26 @@ GLPipelineStateViewer::GLPipelineStateViewer(ICaptureContext &ctx, PipelineState
ui->pipeFlow->setStages(
{
- lit("VTX"), lit("VS"), lit("TCS"), lit("TES"), lit("GS"), lit("RS"), lit("FS"), lit("FB"),
+ lit("VTX"),
+ lit("VS"),
+ lit("TCS"),
+ lit("TES"),
+ lit("GS"),
+ lit("RS"),
+ lit("FS"),
+ lit("FB"),
lit("CS"),
},
{
- tr("Vertex Input"), tr("Vertex Shader"), tr("Tess. Control Shader"),
- tr("Tess. Eval. Shader"), tr("Geometry Shader"), tr("Rasterizer"), tr("Fragment Shader"),
- tr("Framebuffer Output"), tr("Compute Shader"),
+ tr("Vertex Input"),
+ tr("Vertex Shader"),
+ tr("Tess. Control Shader"),
+ tr("Tess. Eval. Shader"),
+ tr("Geometry Shader"),
+ tr("Rasterizer"),
+ tr("Fragment Shader"),
+ tr("Framebuffer Output"),
+ tr("Compute Shader"),
});
ui->pipeFlow->setIsolatedStage(8); // compute shader isolated
@@ -949,10 +960,13 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, RDLabel
filter += QFormatStr(" (%1)").arg(ToQStr(s.filter.filter));
RDTreeWidgetItem *node = new RDTreeWidgetItem({
- slotname, s.resourceId != ResourceId() ? s.resourceId : r.resourceId, addressing,
- filter, QFormatStr("%1 - %2")
- .arg(s.minLOD == -FLT_MAX ? lit("0") : QString::number(s.minLOD))
- .arg(s.maxLOD == FLT_MAX ? lit("FLT_MAX") : QString::number(s.maxLOD)),
+ slotname,
+ s.resourceId != ResourceId() ? s.resourceId : r.resourceId,
+ addressing,
+ filter,
+ QFormatStr("%1 - %2")
+ .arg(s.minLOD == -FLT_MAX ? lit("0") : QString::number(s.minLOD))
+ .arg(s.maxLOD == FLT_MAX ? lit("FLT_MAX") : QString::number(s.maxLOD)),
s.mipLODBias,
});
@@ -1176,12 +1190,10 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, RDLabel
if(showNode(usedSlot, filledSlot))
{
- QString binding =
- readWriteType == GLReadWriteType::Image
- ? tr("Image")
- : readWriteType == GLReadWriteType::Atomic
- ? tr("Atomic")
- : readWriteType == GLReadWriteType::SSBO ? tr("SSBO") : tr("Unknown");
+ QString binding = readWriteType == GLReadWriteType::Image ? tr("Image")
+ : readWriteType == GLReadWriteType::Atomic ? tr("Atomic")
+ : readWriteType == GLReadWriteType::SSBO ? tr("SSBO")
+ : tr("Unknown");
QString slotname = QFormatStr("%1: %2").arg(bindPoint).arg(res.name);
QString dimensions;
@@ -1759,8 +1771,8 @@ void GLPipelineStateViewer::setState()
else
indexstring = QString::number(prev);
- RDTreeWidgetItem *node = new RDTreeWidgetItem({indexstring, s1.x, s1.y, s1.width, s1.height,
- s1.enabled ? tr("True") : tr("False")});
+ RDTreeWidgetItem *node = new RDTreeWidgetItem(
+ {indexstring, s1.x, s1.y, s1.width, s1.height, s1.enabled ? tr("True") : tr("False")});
if(s1.width == 0 || s1.height == 0)
setEmptyRow(node);
@@ -2243,10 +2255,14 @@ void GLPipelineStateViewer::setState()
if(state.stencilState.stencilEnable)
{
ui->stencils->addTopLevelItem(new RDTreeWidgetItem({
- tr("Front"), ToQStr(state.stencilState.frontFace.function),
+ tr("Front"),
+ ToQStr(state.stencilState.frontFace.function),
ToQStr(state.stencilState.frontFace.failOperation),
ToQStr(state.stencilState.frontFace.depthFailOperation),
- ToQStr(state.stencilState.frontFace.passOperation), QVariant(), QVariant(), QVariant(),
+ ToQStr(state.stencilState.frontFace.passOperation),
+ QVariant(),
+ QVariant(),
+ QVariant(),
}));
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 5,
@@ -2596,8 +2612,9 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Vert
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("Enabled"), tr("Vertex Buffer Slot"),
- tr("Format"), tr("Relative Offset"), tr("Generic Value")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Slot"), tr("Enabled"), tr("Vertex Buffer Slot"), tr("Format"),
+ tr("Relative Offset"), tr("Generic Value")},
rows);
}
@@ -2630,8 +2647,9 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Vert
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("Buffer"), tr("Stride"), tr("Offset"),
- tr("Instance Divisor"), tr("Byte Length")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Slot"), tr("Buffer"), tr("Stride"), tr("Offset"),
+ tr("Instance Divisor"), tr("Byte Length")},
rows);
}
@@ -2704,29 +2722,30 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Vert
m_Common.exportHTMLTable(xml,
{
- tr("User Clip Plane"), tr("Enabled"),
+ tr("User Clip Plane"),
+ tr("Enabled"),
},
clipPlaneRows);
xml.writeStartElement(tr("p"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Default Inner Tessellation Level"), tr("Default Outer Tessellation level"),
- },
- {
- QFormatStr("%1, %2")
- .arg(pipe.vertexProcessing.defaultInnerLevel[0])
- .arg(pipe.vertexProcessing.defaultInnerLevel[1]),
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Default Inner Tessellation Level"),
+ tr("Default Outer Tessellation level"),
+ },
+ {
+ QFormatStr("%1, %2")
+ .arg(pipe.vertexProcessing.defaultInnerLevel[0])
+ .arg(pipe.vertexProcessing.defaultInnerLevel[1]),
- QFormatStr("%1, %2, %3, %4")
- .arg(pipe.vertexProcessing.defaultOuterLevel[0])
- .arg(pipe.vertexProcessing.defaultOuterLevel[1])
- .arg(pipe.vertexProcessing.defaultOuterLevel[2])
- .arg(pipe.vertexProcessing.defaultOuterLevel[3]),
- });
+ QFormatStr("%1, %2, %3, %4")
+ .arg(pipe.vertexProcessing.defaultOuterLevel[0])
+ .arg(pipe.vertexProcessing.defaultOuterLevel[1])
+ .arg(pipe.vertexProcessing.defaultOuterLevel[2])
+ .arg(pipe.vertexProcessing.defaultOuterLevel[3]),
+ });
}
}
@@ -3047,12 +3066,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Shad
// show if
{
- QString binding =
- readWriteType == GLReadWriteType::Image
- ? tr("Image")
- : readWriteType == GLReadWriteType::Atomic
- ? tr("Atomic")
- : readWriteType == GLReadWriteType::SSBO ? tr("SSBO") : tr("Unknown");
+ QString binding = readWriteType == GLReadWriteType::Image ? tr("Image")
+ : readWriteType == GLReadWriteType::Atomic ? tr("Atomic")
+ : readWriteType == GLReadWriteType::SSBO ? tr("SSBO")
+ : tr("Unknown");
QString slotname = QFormatStr("%1: %2").arg(bindPoint).arg(res.name);
QString name = m_Ctx.GetResourceName(id);
@@ -3130,8 +3147,9 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Shad
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Slot"), tr("Name"), tr("Type"), tr("Width"), tr("Height"), tr("Depth"),
- tr("Array Size"), tr("Format"), tr("First Mip"), tr("Num Mips")},
+ xml,
+ {tr("Slot"), tr("Name"), tr("Type"), tr("Width"), tr("Height"), tr("Depth"),
+ tr("Array Size"), tr("Format"), tr("First Mip"), tr("Num Mips")},
textureRows);
}
@@ -3167,12 +3185,16 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Shad
xml.writeCharacters(tr("Read-write resources"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Binding"), tr("Resource"), tr("Name"), tr("Dimensions"), tr("Format"), tr("Access"),
- },
- readwriteRows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Binding"),
+ tr("Resource"),
+ tr("Name"),
+ tr("Dimensions"),
+ tr("Format"),
+ tr("Access"),
+ },
+ readwriteRows);
}
}
@@ -3184,9 +3206,8 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Feed
xml.writeCharacters(tr("States"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml, {tr("Active"), tr("Paused")},
- {xfb.active ? tr("Yes") : tr("No"), xfb.paused ? tr("Yes") : tr("No")});
+ m_Common.exportHTMLTable(xml, {tr("Active"), tr("Paused")},
+ {xfb.active ? tr("Yes") : tr("No"), xfb.paused ? tr("Yes") : tr("No")});
}
{
@@ -3242,9 +3263,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Rast
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Multisample Enable"), tr("Sample Shading"), tr("Sample Mask"),
- tr("Sample Coverage"), tr("Sample Coverage Invert"), tr("Alpha to Coverage"),
- tr("Alpha to One"), tr("Min Sample Shading Rate")},
+ xml,
+ {tr("Multisample Enable"), tr("Sample Shading"), tr("Sample Mask"), tr("Sample Coverage"),
+ tr("Sample Coverage Invert"), tr("Alpha to Coverage"), tr("Alpha to One"),
+ tr("Min Sample Shading Rate")},
{
rs.state.multisampleEnable ? tr("Yes") : tr("No"),
rs.state.sampleShading ? tr("Yes") : tr("No"),
@@ -3259,18 +3281,21 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Rast
xml.writeStartElement(tr("p"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Programmable Point Size"), tr("Fixed Point Size"), tr("Line Width"),
- tr("Point Fade Threshold"), tr("Point Origin Upper Left"),
- },
- {
- rs.state.programmablePointSize ? tr("Yes") : tr("No"),
- Formatter::Format(rs.state.pointSize), Formatter::Format(rs.state.lineWidth),
- Formatter::Format(rs.state.pointFadeThreshold),
- rs.state.pointOriginUpperLeft ? tr("Yes") : tr("No"),
- });
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Programmable Point Size"),
+ tr("Fixed Point Size"),
+ tr("Line Width"),
+ tr("Point Fade Threshold"),
+ tr("Point Origin Upper Left"),
+ },
+ {
+ rs.state.programmablePointSize ? tr("Yes") : tr("No"),
+ Formatter::Format(rs.state.pointSize),
+ Formatter::Format(rs.state.lineWidth),
+ Formatter::Format(rs.state.pointFadeThreshold),
+ rs.state.pointOriginUpperLeft ? tr("Yes") : tr("No"),
+ });
xml.writeStartElement(tr("p"));
xml.writeEndElement();
@@ -3289,7 +3314,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Rast
m_Common.exportHTMLTable(
xml,
{
- tr("Derivatives"), tr("Line Smooth"), tr("Poly Smooth"), tr("Tex Compression"),
+ tr("Derivatives"),
+ tr("Line Smooth"),
+ tr("Poly Smooth"),
+ tr("Tex Compression"),
},
{
ToQStr(pipe.hints.derivatives),
@@ -3314,9 +3342,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Rast
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"),
- tr("Min Depth"), tr("Max Depth")},
- rows);
+ m_Common.exportHTMLTable(
+ xml,
+ {tr("Slot"), tr("X"), tr("Y"), tr("Width"), tr("Height"), tr("Min Depth"), tr("Max Depth")},
+ rows);
}
{
@@ -3355,7 +3384,8 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
m_Common.exportHTMLTable(xml, {tr("Framebuffer SRGB"), tr("Blend Factor")},
{
- fb.framebufferSRGB ? tr("Yes") : tr("No"), blendFactor,
+ fb.framebufferSRGB ? tr("Yes") : tr("No"),
+ blendFactor,
});
xml.writeStartElement(tr("h3"));
@@ -3383,15 +3413,21 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
i++;
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Blend Enable"), tr("Blend Source"), tr("Blend Destination"),
- tr("Blend Operation"), tr("Alpha Blend Source"), tr("Alpha Blend Destination"),
- tr("Alpha Blend Operation"), tr("Logic Operation Enabled"), tr("Logic Operation"),
- tr("Write Mask"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Blend Enable"),
+ tr("Blend Source"),
+ tr("Blend Destination"),
+ tr("Blend Operation"),
+ tr("Alpha Blend Source"),
+ tr("Alpha Blend Destination"),
+ tr("Alpha Blend Operation"),
+ tr("Logic Operation Enabled"),
+ tr("Logic Operation"),
+ tr("Write Mask"),
+ },
+ rows);
}
{
@@ -3399,18 +3435,18 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
xml.writeCharacters(tr("Depth State"));
xml.writeEndElement();
- m_Common.exportHTMLTable(xml, {tr("Depth Test Enable"), tr("Depth Writes Enable"),
- tr("Depth Function"), tr("Depth Bounds")},
- {
- pipe.depthState.depthEnable ? tr("Yes") : tr("No"),
- pipe.depthState.depthWrites ? tr("Yes") : tr("No"),
- ToQStr(pipe.depthState.depthFunction),
- pipe.depthState.depthEnable
- ? QFormatStr("%1 - %2")
- .arg(Formatter::Format(pipe.depthState.nearBound))
- .arg(Formatter::Format(pipe.depthState.farBound))
- : tr("Disabled"),
- });
+ m_Common.exportHTMLTable(
+ xml,
+ {tr("Depth Test Enable"), tr("Depth Writes Enable"), tr("Depth Function"), tr("Depth Bounds")},
+ {
+ pipe.depthState.depthEnable ? tr("Yes") : tr("No"),
+ pipe.depthState.depthWrites ? tr("Yes") : tr("No"),
+ ToQStr(pipe.depthState.depthFunction),
+ pipe.depthState.depthEnable ? QFormatStr("%1 - %2")
+ .arg(Formatter::Format(pipe.depthState.nearBound))
+ .arg(Formatter::Format(pipe.depthState.farBound))
+ : tr("Disabled"),
+ });
}
{
@@ -3425,8 +3461,9 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Face"), tr("Reference"), tr("Value Mask"), tr("Write Mask"), tr("Function"),
- tr("Pass Operation"), tr("Fail Operation"), tr("Depth Fail Operation")},
+ xml,
+ {tr("Face"), tr("Reference"), tr("Value Mask"), tr("Write Mask"), tr("Function"),
+ tr("Pass Operation"), tr("Fail Operation"), tr("Depth Fail Operation")},
{
{tr("Front"), Formatter::Format(pipe.stencilState.frontFace.reference, true),
Formatter::Format(pipe.stencilState.frontFace.compareMask, true),
@@ -3485,7 +3522,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Image"), tr("First mip"), tr("First array slice"),
+ tr("Slot"),
+ tr("Image"),
+ tr("First mip"),
+ tr("First array slice"),
},
rows);
@@ -3543,7 +3583,10 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Fram
m_Common.exportHTMLTable(xml,
{
- tr("Slot"), tr("Image"), tr("First mip"), tr("First array slice"),
+ tr("Slot"),
+ tr("Image"),
+ tr("First mip"),
+ tr("First array slice"),
},
rows);
diff --git a/qrenderdoc/Windows/PipelineState/PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/PipelineStateViewer.cpp
index f561303e6..82b9ba3b4 100644
--- a/qrenderdoc/Windows/PipelineState/PipelineStateViewer.cpp
+++ b/qrenderdoc/Windows/PipelineState/PipelineStateViewer.cpp
@@ -1122,47 +1122,47 @@ void PipelineStateViewer::SetupShaderEditButton(QToolButton *button, ResourceId
QAction *action = new QAction(label, menu);
action->setIcon(Icons::page_white_edit());
- QObject::connect(action, &QAction::triggered, [this, pipelineId, shaderId, bindpointMapping,
- shaderDetails]() {
- QString entry;
- QString src;
+ QObject::connect(
+ action, &QAction::triggered, [this, pipelineId, shaderId, bindpointMapping, shaderDetails]() {
+ QString entry;
+ QString src;
- if(shaderDetails->encoding == ShaderEncoding::SPIRV ||
- shaderDetails->encoding == ShaderEncoding::OpenGLSPIRV)
- {
- m_Ctx.Replay().AsyncInvoke([this, pipelineId, shaderId, shaderDetails](IReplayController *r) {
- rdcstr disasm = r->DisassembleShader(pipelineId, shaderDetails, "");
+ if(shaderDetails->encoding == ShaderEncoding::SPIRV ||
+ shaderDetails->encoding == ShaderEncoding::OpenGLSPIRV)
+ {
+ m_Ctx.Replay().AsyncInvoke(
+ [this, pipelineId, shaderId, shaderDetails](IReplayController *r) {
+ rdcstr disasm = r->DisassembleShader(pipelineId, shaderDetails, "");
- QString editeddisasm =
- tr("#### PSEUDOCODE SPIR-V DISASSEMBLY ###\n") +
- tr("#### Use a SPIR-V decompiler to get compileable source ###\n\n");
+ QString editeddisasm =
+ tr("#### PSEUDOCODE SPIR-V DISASSEMBLY ###\n") +
+ tr("#### Use a SPIR-V decompiler to get compileable source ###\n\n");
- editeddisasm += disasm;
+ editeddisasm += disasm;
+
+ GUIInvoke::call(this, [this, shaderId, shaderDetails, editeddisasm]() {
+ rdcstrpairs files;
+ files.push_back(rdcpair("pseudocode", editeddisasm));
+
+ EditShader(shaderId, shaderDetails->stage, shaderDetails->entryPoint,
+ shaderDetails->debugInfo.compileFlags, KnownShaderTool::Unknown,
+ ShaderEncoding::Unknown, files);
+ });
+ });
+ }
+ else if(shaderDetails->encoding == ShaderEncoding::DXBC ||
+ shaderDetails->encoding == ShaderEncoding::DXIL)
+ {
+ entry = lit("EditedShader%1S").arg(ToQStr(shaderDetails->stage, GraphicsAPI::D3D11)[0]);
- GUIInvoke::call(this, [this, shaderId, shaderDetails, editeddisasm]() {
rdcstrpairs files;
- files.push_back(rdcpair("pseudocode", editeddisasm));
+ files.push_back(rdcpair(
+ "decompiled_stub.hlsl", GenerateHLSLStub(bindpointMapping, shaderDetails, entry)));
- EditShader(shaderId, shaderDetails->stage, shaderDetails->entryPoint,
- shaderDetails->debugInfo.compileFlags, KnownShaderTool::Unknown,
- ShaderEncoding::Unknown, files);
- });
+ EditShader(shaderId, shaderDetails->stage, entry, shaderDetails->debugInfo.compileFlags,
+ KnownShaderTool::Unknown, ShaderEncoding::HLSL, files);
+ }
});
- }
- else if(shaderDetails->encoding == ShaderEncoding::DXBC ||
- shaderDetails->encoding == ShaderEncoding::DXIL)
- {
- entry = lit("EditedShader%1S").arg(ToQStr(shaderDetails->stage, GraphicsAPI::D3D11)[0]);
-
- rdcstrpairs files;
- files.push_back(rdcpair(
- "decompiled_stub.hlsl", GenerateHLSLStub(bindpointMapping, shaderDetails, entry)));
-
- EditShader(shaderId, shaderDetails->stage, entry, shaderDetails->debugInfo.compileFlags,
- KnownShaderTool::Unknown, ShaderEncoding::HLSL, files);
- }
-
- });
menu->addAction(action);
}
diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp
index af5edd1f6..afdd54188 100644
--- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp
+++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp
@@ -176,7 +176,8 @@ VulkanPipelineStateViewer::VulkanPipelineStateViewer(ICaptureContext &ctx,
};
QToolButton *viewPredicateBufferButtons[] = {
- ui->predicateBufferViewButton, ui->csPredicateBufferViewButton,
+ ui->predicateBufferViewButton,
+ ui->csPredicateBufferViewButton,
};
RDTreeWidget *resources[] = {
@@ -441,13 +442,26 @@ VulkanPipelineStateViewer::VulkanPipelineStateViewer(ICaptureContext &ctx,
ui->pipeFlow->setStages(
{
- lit("VTX"), lit("VS"), lit("TCS"), lit("TES"), lit("GS"), lit("RS"), lit("FS"), lit("FB"),
+ lit("VTX"),
+ lit("VS"),
+ lit("TCS"),
+ lit("TES"),
+ lit("GS"),
+ lit("RS"),
+ lit("FS"),
+ lit("FB"),
lit("CS"),
},
{
- tr("Vertex Input"), tr("Vertex Shader"), tr("Tess. Control Shader"),
- tr("Tess. Eval. Shader"), tr("Geometry Shader"), tr("Rasterizer"), tr("Fragment Shader"),
- tr("Framebuffer Output"), tr("Compute Shader"),
+ tr("Vertex Input"),
+ tr("Vertex Shader"),
+ tr("Tess. Control Shader"),
+ tr("Tess. Eval. Shader"),
+ tr("Geometry Shader"),
+ tr("Rasterizer"),
+ tr("Fragment Shader"),
+ tr("Framebuffer Output"),
+ tr("Compute Shader"),
});
ui->pipeFlow->setIsolatedStage(8); // compute shader isolated
@@ -1408,7 +1422,13 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
if(!isbuf)
{
node = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType), ResourceId(), lit("-"), QString(),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
+ ResourceId(),
+ lit("-"),
+ QString(),
QString(),
});
@@ -1420,10 +1440,14 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
else
{
node = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
descriptorBind ? descriptorBind->resourceResourceId : ResourceId(),
tr("%1 bytes").arg(len),
- QFormatStr("Viewing bytes %1").arg(formatByteRange(buf, descriptorBind)), QString(),
+ QFormatStr("Viewing bytes %1").arg(formatByteRange(buf, descriptorBind)),
+ QString(),
});
node->setTag(tag);
@@ -1438,9 +1462,14 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
else if(bindType == BindType::ReadOnlyTBuffer || bindType == BindType::ReadWriteTBuffer)
{
node = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType),
- descriptorBind ? descriptorBind->resourceResourceId : ResourceId(), format,
- QFormatStr("bytes %1").arg(formatByteRange(buf, descriptorBind)), QString(),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
+ descriptorBind ? descriptorBind->resourceResourceId : ResourceId(),
+ format,
+ QFormatStr("bytes %1").arg(formatByteRange(buf, descriptorBind)),
+ QString(),
});
node->setTag(tag);
@@ -1456,7 +1485,13 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
if(descriptorBind == NULL || descriptorBind->samplerResourceId == ResourceId())
{
node = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType), ResourceId(), lit("-"), QString(),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
+ ResourceId(),
+ lit("-"),
+ QString(),
QString(),
});
@@ -1481,7 +1516,13 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
if(descriptorBind == NULL || descriptorBind->resourceResourceId == ResourceId())
{
node = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType), ResourceId(), lit("-"), QString(),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
+ ResourceId(),
+ lit("-"),
+ QString(),
QString(),
});
@@ -1525,8 +1566,14 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
dim += QFormatStr(", %1x MSAA").arg(samples);
node = new RDTreeWidgetItem({
- QString(), setname, slotname, typeName, descriptorBind->resourceResourceId, dim,
- format, QString(),
+ QString(),
+ setname,
+ slotname,
+ typeName,
+ descriptorBind->resourceResourceId,
+ dim,
+ format,
+ QString(),
});
node->setTag(tag);
@@ -1542,7 +1589,13 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
if(descriptorBind == NULL || descriptorBind->samplerResourceId == ResourceId())
{
samplerNode = new RDTreeWidgetItem({
- QString(), setname, slotname, ToQStr(bindType), ResourceId(), lit("-"), QString(),
+ QString(),
+ setname,
+ slotname,
+ ToQStr(bindType),
+ ResourceId(),
+ lit("-"),
+ QString(),
QString(),
});
@@ -3037,10 +3090,14 @@ void VulkanPipelineStateViewer::setState()
if(state.depthStencil.stencilTestEnable)
{
ui->stencils->addTopLevelItem(new RDTreeWidgetItem({
- tr("Front"), ToQStr(state.depthStencil.frontFace.function),
+ tr("Front"),
+ ToQStr(state.depthStencil.frontFace.function),
ToQStr(state.depthStencil.frontFace.failOperation),
ToQStr(state.depthStencil.frontFace.depthFailOperation),
- ToQStr(state.depthStencil.frontFace.passOperation), QVariant(), QVariant(), QVariant(),
+ ToQStr(state.depthStencil.frontFace.passOperation),
+ QVariant(),
+ QVariant(),
+ QVariant(),
}));
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 5,
@@ -3051,10 +3108,14 @@ void VulkanPipelineStateViewer::setState()
state.depthStencil.frontFace.reference);
ui->stencils->addTopLevelItem(new RDTreeWidgetItem({
- tr("Back"), ToQStr(state.depthStencil.backFace.function),
+ tr("Back"),
+ ToQStr(state.depthStencil.backFace.function),
ToQStr(state.depthStencil.backFace.failOperation),
ToQStr(state.depthStencil.backFace.depthFailOperation),
- ToQStr(state.depthStencil.backFace.passOperation), QVariant(), QVariant(), QVariant(),
+ ToQStr(state.depthStencil.backFace.passOperation),
+ QVariant(),
+ QVariant(),
+ QVariant(),
}));
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(1), 5,
@@ -3203,9 +3264,8 @@ void VulkanPipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, i
QString format;
- if(stage->reflection &&
- buf.bindPoint < (buf.rwRes ? stage->reflection->readWriteResources.size()
- : stage->reflection->readOnlyResources.size()))
+ if(stage->reflection && buf.bindPoint < (buf.rwRes ? stage->reflection->readWriteResources.size()
+ : stage->reflection->readOnlyResources.size()))
{
const ShaderResource &shaderRes = buf.rwRes
? stage->reflection->readWriteResources[buf.bindPoint]
@@ -3736,8 +3796,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
}
}
- m_Common.exportHTMLTable(xml, {tr("Set"), tr("Bind"), tr("Buffer"), tr("Byte Offset"),
- tr("Byte Size"), tr("Number of Variables"), tr("Bytes Needed")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Set"), tr("Bind"), tr("Buffer"), tr("Byte Offset"),
+ tr("Byte Size"), tr("Number of Variables"), tr("Bytes Needed")},
rows);
}
@@ -3850,8 +3911,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
}
m_Common.exportHTMLTable(
- xml, {tr("Set"), tr("Bind"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"),
- tr("Depth"), tr("Array Size"), tr("Resource Format"), tr("View Parameters")},
+ xml,
+ {tr("Set"), tr("Bind"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"), tr("Depth"),
+ tr("Array Size"), tr("Resource Format"), tr("View Parameters")},
rows);
}
@@ -3946,8 +4008,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
}
m_Common.exportHTMLTable(
- xml, {tr("Set"), tr("Bind"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"),
- tr("Depth"), tr("Array Size"), tr("Resource Format"), tr("View Parameters")},
+ xml,
+ {tr("Set"), tr("Bind"), tr("Resource"), tr("Type"), tr("Width"), tr("Height"), tr("Depth"),
+ tr("Array Size"), tr("Resource Format"), tr("View Parameters")},
rows);
}
}
@@ -3990,8 +4053,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
i++;
}
- m_Common.exportHTMLTable(xml, {tr("Slot"), tr("Buffer"), tr("Byte Offset"), tr("Byte Length"),
- tr("Counter Buffer"), tr("Counter Offset")},
+ m_Common.exportHTMLTable(xml,
+ {tr("Slot"), tr("Buffer"), tr("Byte Offset"), tr("Byte Length"),
+ tr("Counter Buffer"), tr("Counter Offset")},
rows);
}
}
@@ -4010,27 +4074,31 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
xml.writeStartElement(lit("p"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Depth Clamp Enable"), tr("Depth Clip Enable"), tr("Rasterizer Discard Enable"),
- },
- {
- rs.depthClampEnable ? tr("Yes") : tr("No"), rs.depthClipEnable ? tr("Yes") : tr("No"),
- rs.rasterizerDiscardEnable ? tr("Yes") : tr("No"),
- });
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Depth Clamp Enable"),
+ tr("Depth Clip Enable"),
+ tr("Rasterizer Discard Enable"),
+ },
+ {
+ rs.depthClampEnable ? tr("Yes") : tr("No"),
+ rs.depthClipEnable ? tr("Yes") : tr("No"),
+ rs.rasterizerDiscardEnable ? tr("Yes") : tr("No"),
+ });
xml.writeStartElement(lit("p"));
xml.writeEndElement();
- m_Common.exportHTMLTable(
- xml, {tr("Depth Bias Enable"), tr("Depth Bias"), tr("Depth Bias Clamp"),
- tr("Slope Scaled Bias"), tr("Line Width")},
- {
- rs.depthBiasEnable ? tr("Yes") : tr("No"), Formatter::Format(rs.depthBias),
- Formatter::Format(rs.depthBiasClamp), Formatter::Format(rs.slopeScaledDepthBias),
- Formatter::Format(rs.lineWidth),
- });
+ m_Common.exportHTMLTable(xml,
+ {tr("Depth Bias Enable"), tr("Depth Bias"), tr("Depth Bias Clamp"),
+ tr("Slope Scaled Bias"), tr("Line Width")},
+ {
+ rs.depthBiasEnable ? tr("Yes") : tr("No"),
+ Formatter::Format(rs.depthBias),
+ Formatter::Format(rs.depthBiasClamp),
+ Formatter::Format(rs.slopeScaledDepthBias),
+ Formatter::Format(rs.lineWidth),
+ });
}
const VKPipe::MultiSample &msaa = m_Ctx.CurVulkanPipelineState()->multisample;
@@ -4041,8 +4109,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Raster Samples"), tr("Sample-rate shading"), tr("Min Sample Shading Rate"),
- tr("Sample Mask")},
+ xml,
+ {tr("Raster Samples"), tr("Sample-rate shading"), tr("Min Sample Shading Rate"),
+ tr("Sample Mask")},
{msaa.rasterSamples, msaa.sampleShadingEnable ? tr("Yes") : tr("No"),
Formatter::Format(msaa.minSampleShading), Formatter::Format(msaa.sampleMask, true)});
}
@@ -4113,7 +4182,8 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
{
cb.alphaToCoverageEnable ? tr("Yes") : tr("No"),
cb.alphaToOneEnable ? tr("Yes") : tr("No"),
- logic ? ToQStr(cb.blends[0].logicOperation) : tr("Disabled"), blendConst,
+ logic ? ToQStr(cb.blends[0].logicOperation) : tr("Disabled"),
+ blendConst,
});
xml.writeStartElement(lit("h3"));
@@ -4137,14 +4207,19 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
i++;
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Blend Enable"), tr("Blend Source"), tr("Blend Destination"),
- tr("Blend Operation"), tr("Alpha Blend Source"), tr("Alpha Blend Destination"),
- tr("Alpha Blend Operation"), tr("Write Mask"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Blend Enable"),
+ tr("Blend Source"),
+ tr("Blend Destination"),
+ tr("Blend Operation"),
+ tr("Alpha Blend Source"),
+ tr("Alpha Blend Destination"),
+ tr("Alpha Blend Operation"),
+ tr("Write Mask"),
+ },
+ rows);
}
void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::DepthStencil &ds)
@@ -4155,15 +4230,16 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
xml.writeEndElement();
m_Common.exportHTMLTable(
- xml, {tr("Depth Test Enable"), tr("Depth Writes Enable"), tr("Depth Function"),
- tr("Depth Bounds")},
+ xml,
+ {tr("Depth Test Enable"), tr("Depth Writes Enable"), tr("Depth Function"), tr("Depth Bounds")},
{
- ds.depthTestEnable ? tr("Yes") : tr("No"), ds.depthWriteEnable ? tr("Yes") : tr("No"),
- ToQStr(ds.depthFunction), ds.depthBoundsEnable
- ? QFormatStr("%1 - %2")
- .arg(Formatter::Format(ds.minDepthBounds))
- .arg(Formatter::Format(ds.maxDepthBounds))
- : tr("Disabled"),
+ ds.depthTestEnable ? tr("Yes") : tr("No"),
+ ds.depthWriteEnable ? tr("Yes") : tr("No"),
+ ToQStr(ds.depthFunction),
+ ds.depthBoundsEnable ? QFormatStr("%1 - %2")
+ .arg(Formatter::Format(ds.minDepthBounds))
+ .arg(Formatter::Format(ds.maxDepthBounds))
+ : tr("Disabled"),
});
}
@@ -4177,18 +4253,24 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
QList rows;
rows.push_back({
- tr("Front"), Formatter::Format(ds.frontFace.reference, true),
+ tr("Front"),
+ Formatter::Format(ds.frontFace.reference, true),
Formatter::Format(ds.frontFace.compareMask, true),
- Formatter::Format(ds.frontFace.writeMask, true), ToQStr(ds.frontFace.function),
- ToQStr(ds.frontFace.passOperation), ToQStr(ds.frontFace.failOperation),
+ Formatter::Format(ds.frontFace.writeMask, true),
+ ToQStr(ds.frontFace.function),
+ ToQStr(ds.frontFace.passOperation),
+ ToQStr(ds.frontFace.failOperation),
ToQStr(ds.frontFace.depthFailOperation),
});
rows.push_back({
- tr("back"), Formatter::Format(ds.backFace.reference, true),
+ tr("back"),
+ Formatter::Format(ds.backFace.reference, true),
Formatter::Format(ds.backFace.compareMask, true),
- Formatter::Format(ds.backFace.writeMask, true), ToQStr(ds.backFace.function),
- ToQStr(ds.backFace.passOperation), ToQStr(ds.backFace.failOperation),
+ Formatter::Format(ds.backFace.writeMask, true),
+ ToQStr(ds.backFace.function),
+ ToQStr(ds.backFace.passOperation),
+ ToQStr(ds.backFace.failOperation),
ToQStr(ds.backFace.depthFailOperation),
});
@@ -4236,14 +4318,21 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
i++;
}
- m_Common.exportHTMLTable(
- xml,
- {
- tr("Slot"), tr("Image"), tr("Width"), tr("Height"), tr("Depth"), tr("Array Size"),
- tr("First mip"), tr("Number of mips"), tr("First array layer"), tr("Number of layers"),
- tr("Sample Count"),
- },
- rows);
+ m_Common.exportHTMLTable(xml,
+ {
+ tr("Slot"),
+ tr("Image"),
+ tr("Width"),
+ tr("Height"),
+ tr("Depth"),
+ tr("Array Size"),
+ tr("First mip"),
+ tr("Number of mips"),
+ tr("First array layer"),
+ tr("Number of layers"),
+ tr("Sample Count"),
+ },
+ rows);
}
{
@@ -4376,7 +4465,9 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml,
m_Common.exportHTMLTable(
xml, {tr("Predicate Passing"), tr("Is Inverted"), tr("Buffer"), tr("Byte Offset")},
{
- cr.isPassing ? tr("Yes") : tr("No"), cr.isInverted ? tr("Yes") : tr("No"), bufferName,
+ cr.isPassing ? tr("Yes") : tr("No"),
+ cr.isInverted ? tr("Yes") : tr("No"),
+ bufferName,
(qulonglong)cr.byteOffset,
});
}
@@ -4788,10 +4879,11 @@ void VulkanPipelineStateViewer::exportFOZ(QString dir, ResourceId pso)
{
const SDObject *createInfo = create->FindChildRecursively("CreateInfo");
- QVariant layoutData = ConvertSDObjectToFossilizeJSON(
- createInfo, {
- {"bindingCount", ""}, {"pBindings", "bindings"},
- });
+ QVariant layoutData =
+ ConvertSDObjectToFossilizeJSON(createInfo, {
+ {"bindingCount", ""},
+ {"pBindings", "bindings"},
+ });
QVariantMap root({{lit("setLayouts"), QVariantMap({{GetFossilizeHash(id), layoutData}})}});
diff --git a/qrenderdoc/Windows/PythonShell.cpp b/qrenderdoc/Windows/PythonShell.cpp
index 35760afb6..b2278c838 100644
--- a/qrenderdoc/Windows/PythonShell.cpp
+++ b/qrenderdoc/Windows/PythonShell.cpp
@@ -427,7 +427,7 @@ struct ExtensionInvoker : ObjectForwarder
void MenuDisplaying(ContextMenu contextMenu, QMenu *menu, const ExtensionCallbackData &data)
{
InvokeVoidFunction(
- (void (IExtensionManager::*)(ContextMenu, QMenu *, const ExtensionCallbackData &)) &
+ (void(IExtensionManager::*)(ContextMenu, QMenu *, const ExtensionCallbackData &)) &
IExtensionManager::MenuDisplaying,
contextMenu, menu, data);
}
@@ -435,7 +435,7 @@ struct ExtensionInvoker : ObjectForwarder
const ExtensionCallbackData &data)
{
InvokeVoidFunction(
- (void (IExtensionManager::*)(PanelMenu, QMenu *, QWidget *, const ExtensionCallbackData &)) &
+ (void(IExtensionManager::*)(PanelMenu, QMenu *, QWidget *, const ExtensionCallbackData &)) &
IExtensionManager::MenuDisplaying,
panelMenu, menu, extensionButton, data);
}
@@ -928,14 +928,15 @@ PythonShell::PythonShell(ICaptureContext &ctx, QWidget *parent)
scriptEditor->colourise(0, -1);
- QObject::connect(scriptEditor, &ScintillaEdit::modified, [this](int type, int, int, int,
- const QByteArray &, int, int, int) {
- if(type & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE))
- {
- scriptEditor->markerDeleteAll(CURRENT_MARKER);
- scriptEditor->markerDeleteAll(CURRENT_MARKER + 1);
- }
- });
+ QObject::connect(scriptEditor, &ScintillaEdit::modified,
+ [this](int type, int, int, int, const QByteArray &, int, int, int) {
+ if(type & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_MOD_BEFOREINSERT |
+ SC_MOD_BEFOREDELETE))
+ {
+ scriptEditor->markerDeleteAll(CURRENT_MARKER);
+ scriptEditor->markerDeleteAll(CURRENT_MARKER + 1);
+ }
+ });
QObject::connect(scriptEditor, &ScintillaEdit::charAdded, [this](int ch) {
if(ch == '.')
@@ -1033,7 +1034,6 @@ void PythonShell::RunScript()
enableButtons(false);
LambdaThread *thread = new LambdaThread([this, script, context]() {
-
scriptContext = context;
context->executeString(lit("script.py"), script);
scriptContext = NULL;
@@ -1336,7 +1336,8 @@ try:
help(%1)
except ImportError:
help(%1)
-)").arg(ui->helpSearch->text()));
+)")
+ .arg(ui->helpSearch->text()));
context->Finish();
}
diff --git a/qrenderdoc/Windows/ResourceInspector.cpp b/qrenderdoc/Windows/ResourceInspector.cpp
index 89435a31d..5c6dc6646 100644
--- a/qrenderdoc/Windows/ResourceInspector.cpp
+++ b/qrenderdoc/Windows/ResourceInspector.cpp
@@ -294,7 +294,6 @@ void ResourceInspector::Inspect(ResourceId id)
rdcarray entries = r->GetShaderEntryPoints(id);
GUIInvoke::call(this, [this, entries, usage] {
-
if(!entries.isEmpty())
{
m_Entries = entries;
diff --git a/qrenderdoc/Windows/ShaderMessageViewer.cpp b/qrenderdoc/Windows/ShaderMessageViewer.cpp
index 10b73378b..ee9c1d69f 100644
--- a/qrenderdoc/Windows/ShaderMessageViewer.cpp
+++ b/qrenderdoc/Windows/ShaderMessageViewer.cpp
@@ -862,10 +862,11 @@ void ShaderMessageViewer::refreshMessages()
if(msg.stage == ShaderStage::Compute)
{
node = new RDTreeWidgetItem({
- QString(), QFormatStr("%1, %2, %3")
- .arg(msg.location.compute.workgroup[0])
- .arg(msg.location.compute.workgroup[1])
- .arg(msg.location.compute.workgroup[2]),
+ QString(),
+ QFormatStr("%1, %2, %3")
+ .arg(msg.location.compute.workgroup[0])
+ .arg(msg.location.compute.workgroup[1])
+ .arg(msg.location.compute.workgroup[2]),
QFormatStr("%1, %2, %3")
.arg(msg.location.compute.thread[0])
.arg(msg.location.compute.thread[1])
@@ -880,9 +881,9 @@ void ShaderMessageViewer::refreshMessages()
node = new RDTreeWidgetItem({QString(), QString(), location, text});
node->setData(0, debuggableRole, refl && refl->debugInfo.debuggable);
- node->setData(1, gotoableRole, msg.stage == ShaderStage::Vertex ||
- msg.stage == ShaderStage::Pixel ||
- msg.stage == ShaderStage::Geometry);
+ node->setData(1, gotoableRole,
+ msg.stage == ShaderStage::Vertex || msg.stage == ShaderStage::Pixel ||
+ msg.stage == ShaderStage::Geometry);
}
if(node)
diff --git a/qrenderdoc/Windows/ShaderViewer.cpp b/qrenderdoc/Windows/ShaderViewer.cpp
index 038ee47fb..853a251de 100644
--- a/qrenderdoc/Windows/ShaderViewer.cpp
+++ b/qrenderdoc/Windows/ShaderViewer.cpp
@@ -312,13 +312,14 @@ void ShaderViewer::editShader(ResourceId id, ShaderStage stage, const QString &e
scintilla->setReadOnly(false);
QObject::connect(scintilla, &ScintillaEdit::keyPressed, this, &ShaderViewer::editable_keyPressed);
- QObject::connect(scintilla, &ScintillaEdit::modified, [this](int type, int, int, int,
- const QByteArray &, int, int, int) {
- if(type & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE))
- m_FindState = FindState();
+ QObject::connect(scintilla, &ScintillaEdit::modified,
+ [this](int type, int, int, int, const QByteArray &, int, int, int) {
+ if(type & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_MOD_BEFOREINSERT |
+ SC_MOD_BEFOREDELETE))
+ m_FindState = FindState();
- MarkModification();
- });
+ MarkModification();
+ });
m_Ctx.GetMainWindow()->RegisterShortcut(QKeySequence(QKeySequence::Refresh).toString(), this,
[this](QWidget *) { on_refresh_clicked(); });
@@ -1000,10 +1001,10 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
for(int i = 0; m_BackgroundRunning.available() == 1 && i < 100; i++)
QThread::msleep(5);
- ShowProgressDialog(this, tr("Debugging %1").arg(debugContext),
- [this]() { return m_BackgroundRunning.available() == 0; }, NULL,
- [this]() { m_BackgroundRunning.acquire(); });
-
+ ShowProgressDialog(
+ this, tr("Debugging %1").arg(debugContext),
+ [this]() { return m_BackgroundRunning.available() == 0; }, NULL,
+ [this]() { m_BackgroundRunning.acquire(); });
});
m_CurrentStateIdx = 0;
@@ -1027,7 +1028,10 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
&ShaderViewer::accessedResources_contextMenu);
RDTreeWidgetItem *item = new RDTreeWidgetItem({
- QVariant(), QVariant(), QVariant(), QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
item->setEditable(0, true);
ui->watch->addTopLevelItem(item);
@@ -1777,7 +1781,10 @@ void ShaderViewer::variables_contextMenu(const QPoint &pos)
QObject::connect(&clearAll, &QAction::triggered, [this] {
ui->watch->clear();
RDTreeWidgetItem *item = new RDTreeWidgetItem({
- QVariant(), QVariant(), QVariant(), QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
item->setEditable(0, true);
ui->watch->addTopLevelItem(item);
@@ -2039,7 +2046,10 @@ void ShaderViewer::on_watch_itemChanged(RDTreeWidgetItem *item, int column)
!ui->watch->topLevelItem(ui->watch->topLevelItemCount() - 1)->text(0).isEmpty())
{
RDTreeWidgetItem *blankItem = new RDTreeWidgetItem({
- QVariant(), QVariant(), QVariant(), QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
blankItem->setEditable(0, true);
ui->watch->addTopLevelItem(blankItem);
@@ -3652,8 +3662,8 @@ void ShaderViewer::updateDebugState()
}
}
- if(isSourceDebugging() ||
- ui->docking->areaOf(m_CurInstructionScintilla) != ui->docking->areaOf(m_DisassemblyFrame))
+ if(isSourceDebugging() || ui->docking->areaOf(m_CurInstructionScintilla) !=
+ ui->docking->areaOf(m_DisassemblyFrame))
ToolWindowManager::raiseToolWindow(m_CurInstructionScintilla);
int pos = m_CurInstructionScintilla->positionFromLine(lineInfo.lineStart - 1);
@@ -3823,7 +3833,9 @@ void ShaderViewer::updateDebugState()
QString childName = QFormatStr("%1[%2]").arg(ro.name).arg(a);
RDTreeWidgetItem *child = new RDTreeWidgetItem({
QFormatStr("%1[%2]").arg(m_ShaderDetails->readOnlyResources[i].name).arg(a),
- childName, lit("Resource"), ToQStr(roBind.resources[a].resourceId),
+ childName,
+ lit("Resource"),
+ ToQStr(roBind.resources[a].resourceId),
});
child->setTag(
QVariant::fromValue(VariableTag(DebugVariableType::ReadOnlyResource, childName)));
@@ -3892,7 +3904,9 @@ void ShaderViewer::updateDebugState()
QString childName = QFormatStr("%1[%2]").arg(rw.name).arg(a);
RDTreeWidgetItem *child = new RDTreeWidgetItem({
QFormatStr("%1[%2]").arg(m_ShaderDetails->readWriteResources[i].name).arg(a),
- childName, lit("RW Resource"), ToQStr(rwBind.resources[a].resourceId),
+ childName,
+ lit("RW Resource"),
+ ToQStr(rwBind.resources[a].resourceId),
});
child->setTag(
QVariant::fromValue(VariableTag(DebugVariableType::ReadWriteResource, childName)));
@@ -3958,8 +3972,10 @@ void ShaderViewer::updateDebugState()
{
QString childName = QFormatStr("%1[%2]").arg(s.name).arg(a);
RDTreeWidgetItem *child = new RDTreeWidgetItem({
- QFormatStr("%1[%2]").arg(m_ShaderDetails->samplers[i].name).arg(a), childName,
- lit("Sampler"), samplerRep(bind, a, sampBind.resources[a].resourceId),
+ QFormatStr("%1[%2]").arg(m_ShaderDetails->samplers[i].name).arg(a),
+ childName,
+ lit("Sampler"),
+ samplerRep(bind, a, sampBind.resources[a].resourceId),
});
child->setTag(QVariant::fromValue(VariableTag(DebugVariableType::Sampler, childName)));
node->addChild(child);
@@ -4129,7 +4145,10 @@ bool ShaderViewer::updateWatchVariable(RDTreeWidgetItem *watchItem, const RDTree
{
idx = watchItem->childCount();
RDTreeWidgetItem *item = new RDTreeWidgetItem({
- name, QVariant(), QVariant(), QVariant(),
+ name,
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
VariableTag tag = VariableTag(DebugVariableType::Variable, path);
tag.state = WatchVarState::Valid;
@@ -4210,7 +4229,10 @@ bool ShaderViewer::updateWatchVariable(RDTreeWidgetItem *watchItem, const RDTree
dataSize * var.columns);
RDTreeWidgetItem *item = new RDTreeWidgetItem({
- rowVar.name, QVariant(), QVariant(), QVariant(),
+ rowVar.name,
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
updateWatchVariable(item, varItem->child(r), path + ".row" + ToStr(r), ~0U, rowVar, regcast);
@@ -4612,7 +4634,9 @@ RDTreeWidgetItem *ShaderViewer::makeSourceVariableNode(const SourceVariableMappi
{
for(uint32_t a = 0; a < bind.arraySize; a++)
children.push_back(new RDTreeWidgetItem({
- QFormatStr("%1[%2]").arg(localName).arg(a), QString(), typeName,
+ QFormatStr("%1[%2]").arg(localName).arg(a),
+ QString(),
+ typeName,
samplerRep(bind, a, res.resources[a].resourceId),
}));
@@ -4668,7 +4692,9 @@ RDTreeWidgetItem *ShaderViewer::makeSourceVariableNode(const SourceVariableMappi
uint32_t count = qMin(bind.arraySize, (uint32_t)res.resources.size());
for(uint32_t a = 0; a < count; a++)
children.push_back(new RDTreeWidgetItem({
- QFormatStr("%1[%2]").arg(localName).arg(a), QString(), typeName,
+ QFormatStr("%1[%2]").arg(localName).arg(a),
+ QString(),
+ typeName,
ToQStr(res.resources[a].resourceId),
}));
@@ -5229,7 +5255,10 @@ void ShaderViewer::AddWatch(const rdcstr &variable)
return;
RDTreeWidgetItem *item = new RDTreeWidgetItem({
- QString(variable), QVariant(), QVariant(), QVariant(),
+ QString(variable),
+ QVariant(),
+ QVariant(),
+ QVariant(),
});
item->setEditable(0, true);
ui->watch->insertTopLevelItem(ui->watch->topLevelItemCount() - 1, item);
@@ -5951,10 +5980,11 @@ bool ShaderViewer::ProcessIncludeDirectives(QString &source, const rdcstrpairs &
void ShaderViewer::on_resetEdits_clicked()
{
- QMessageBox::StandardButton res = RDDialog::question(
- this, tr("Are you sure?"), tr("Are you sure you want to reset all edits and restore the "
- "shader source back to the original?"),
- QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
+ QMessageBox::StandardButton res =
+ RDDialog::question(this, tr("Are you sure?"),
+ tr("Are you sure you want to reset all edits and restore the "
+ "shader source back to the original?"),
+ QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if(res != QMessageBox::Yes)
return;
diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp
index 3721fe478..4f035ea14 100644
--- a/qrenderdoc/Windows/TextureViewer.cpp
+++ b/qrenderdoc/Windows/TextureViewer.cpp
@@ -886,8 +886,10 @@ void TextureViewer::RT_UpdateVisualRange(IReplayController *r)
fmt.compCount = 4;
rdcfixedarray channels = {
- m_TexDisplay.red ? true : false, m_TexDisplay.green && fmt.compCount > 1,
- m_TexDisplay.blue && fmt.compCount > 2, m_TexDisplay.alpha && fmt.compCount > 3,
+ m_TexDisplay.red ? true : false,
+ m_TexDisplay.green && fmt.compCount > 1,
+ m_TexDisplay.blue && fmt.compCount > 2,
+ m_TexDisplay.alpha && fmt.compCount > 3,
};
ResourceId textureId = m_TexDisplay.resourceId;
@@ -3693,7 +3695,6 @@ void TextureViewer::AutoFitRange()
return;
m_Ctx.Replay().AsyncInvoke([this](IReplayController *r) {
-
ResourceId textureId = m_TexDisplay.resourceId;
Subresource sub = m_TexDisplay.subresource;
CompType typeCast = m_TexDisplay.typeCast;
@@ -4103,7 +4104,6 @@ void TextureViewer::on_debugPixelContext_clicked()
}
done = true;
-
});
QString debugContext = tr("Pixel %1,%2").arg(x).arg(y);
diff --git a/renderdoc/android/android.cpp b/renderdoc/android/android.cpp
index 1776d8220..a1de000d9 100644
--- a/renderdoc/android/android.cpp
+++ b/renderdoc/android/android.cpp
@@ -970,9 +970,8 @@ struct AndroidController : public IDeviceProtocolHandler
dev.name = Android::GetFriendlyName(d);
if(!Android::IsSupported(d))
dev.name += " - (Android 5.x)";
- dev.portbase =
- uint16_t(RenderDoc_ForwardPortBase +
- RenderDoc::Inst().GetForwardedPortSlot() * RenderDoc_ForwardPortStride);
+ dev.portbase = uint16_t(RenderDoc_ForwardPortBase + RenderDoc::Inst().GetForwardedPortSlot() *
+ RenderDoc_ForwardPortStride);
// silently forward the ports now. These may be refreshed but this will allow us to connect
Android::adbForwardPorts(dev.portbase, d, 0, 0, true);
@@ -1198,8 +1197,7 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const rdcstr &packageAndActi
uint32_t ident = RenderDoc_FirstTargetControlPort;
AndroidController::m_Inst.Invoke([this, &result, &ident, packageAndActivity, intentArgs, opts]() {
- rdcstr packageName =
- Android::GetPackageName(packageAndActivity); // Remove leading '/' if any
+ rdcstr packageName = Android::GetPackageName(packageAndActivity); // Remove leading '/' if any
// adb shell cmd package resolve-activity -c android.intent.category.LAUNCHER com.jake.cube1
rdcstr activityName = Android::GetActivityName(packageAndActivity);
diff --git a/renderdoc/api/app/renderdoc_app.h b/renderdoc/api/app/renderdoc_app.h
index a4514c6b6..9cf0bf489 100644
--- a/renderdoc/api/app/renderdoc_app.h
+++ b/renderdoc/api/app/renderdoc_app.h
@@ -72,7 +72,8 @@ extern "C" {
// RenderDoc capture options
//
-typedef enum RENDERDOC_CaptureOption {
+typedef enum RENDERDOC_CaptureOption
+{
// Allow the application to enable vsync
//
// Default - enabled
@@ -246,7 +247,8 @@ typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_Capture
// If the option is invalid, -FLT_MAX is returned
typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt);
-typedef enum RENDERDOC_InputButton {
+typedef enum RENDERDOC_InputButton
+{
// '0' - '9' matches ASCII values
eRENDERDOC_Key_0 = 0x30,
eRENDERDOC_Key_1 = 0x31,
@@ -334,7 +336,8 @@ typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton
// If keys is NULL or num is 0, captures keys will be disabled
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num);
-typedef enum RENDERDOC_OverlayBits {
+typedef enum RENDERDOC_OverlayBits
+{
// This single bit controls whether the overlay is enabled or disabled globally
eRENDERDOC_Overlay_Enabled = 0x1,
@@ -570,7 +573,8 @@ typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title);
// Note that this means the API returned can be higher than the one you might have requested.
// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned
// instead of 1.0.0. You can check this with the GetAPIVersion entry point
-typedef enum RENDERDOC_Version {
+typedef enum RENDERDOC_Version
+{
eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00
eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01
eRENDERDOC_API_Version_1_0_2 = 10002, // RENDERDOC_API_1_0_2 = 1 00 02
diff --git a/renderdoc/api/replay/apidefs.h b/renderdoc/api/replay/apidefs.h
index 2f55ec2fa..c3f93ddc4 100644
--- a/renderdoc/api/replay/apidefs.h
+++ b/renderdoc/api/replay/apidefs.h
@@ -199,44 +199,42 @@ constexpr inline unsigned int arraydim()
#define ENUM_ARRAY_SIZE(enum_name) int(enum_name::Count)
-// clang-format makes a even more of a mess of this multi-line macro than it usually does, for some
-// reason. So we just disable it since it's still readable and this isn't really the intended case
-// we are using clang-format for.
+#define BITMASK_OPERATORS(enum_name) \
+ \
+ constexpr inline enum_name operator|(enum_name a, enum_name b) \
+ { \
+ typedef typename std::underlying_type::type etype; \
+ return enum_name(etype(a) | etype(b)); \
+ } \
+ \
+ constexpr inline EnumCastHelper operator&(enum_name a, enum_name b) \
+ { \
+ typedef typename std::underlying_type::type etype; \
+ return EnumCastHelper(enum_name(etype(a) & etype(b))); \
+ } \
+ \
+ constexpr inline enum_name operator~(enum_name a) \
+ { \
+ typedef typename std::underlying_type::type etype; \
+ return enum_name(~etype(a)); \
+ } \
+ \
+ inline enum_name &operator|=(enum_name &a, enum_name b) \
+ { \
+ return a = a | b; \
+ } \
+ \
+ inline enum_name &operator&=(enum_name &a, enum_name b) \
+ { \
+ return a = a & b; \
+ }
-// clang-format off
-#define BITMASK_OPERATORS(enum_name) \
- \
-constexpr inline enum_name operator|(enum_name a, enum_name b) \
-{ \
- typedef typename std::underlying_type::type etype; \
- return enum_name(etype(a) | etype(b)); \
-} \
- \
-constexpr inline EnumCastHelper operator&(enum_name a, enum_name b) \
-{ \
- typedef typename std::underlying_type::type etype; \
- return EnumCastHelper(enum_name(etype(a) & etype(b))); \
-} \
- \
-constexpr inline enum_name operator~(enum_name a) \
-{ \
- typedef typename std::underlying_type::type etype; \
- return enum_name(~etype(a)); \
-} \
- \
-inline enum_name &operator|=(enum_name &a, enum_name b) \
-{ return a = a | b; } \
- \
-inline enum_name &operator&=(enum_name &a, enum_name b) \
-{ return a = a & b; }
-
-#define ITERABLE_OPERATORS(enum_name) \
- \
-inline enum_name operator++(enum_name &a) \
-{ \
- typedef typename std::underlying_type::type etype; \
- return a = enum_name(etype(a)+1); \
-}
-// clang-format on
+#define ITERABLE_OPERATORS(enum_name) \
+ \
+ inline enum_name operator++(enum_name &a) \
+ { \
+ typedef typename std::underlying_type::type etype; \
+ return a = enum_name(etype(a) + 1); \
+ }
#endif
diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h
index 3dbb1f1b7..8a54eaeef 100644
--- a/renderdoc/api/replay/data_types.h
+++ b/renderdoc/api/replay/data_types.h
@@ -375,14 +375,12 @@ texel.
case ResourceFormatType::Undefined: break;
case ResourceFormatType::Regular: return compByteWidth * compCount;
case ResourceFormatType::BC1:
- case ResourceFormatType::BC4:
- return 8; // 8 bytes for 4x4 block
+ case ResourceFormatType::BC4: return 8; // 8 bytes for 4x4 block
case ResourceFormatType::BC2:
case ResourceFormatType::BC3:
case ResourceFormatType::BC5:
case ResourceFormatType::BC6:
- case ResourceFormatType::BC7:
- return 16; // 16 bytes for 4x4 block
+ case ResourceFormatType::BC7: return 16; // 16 bytes for 4x4 block
case ResourceFormatType::ETC2: return 8;
case ResourceFormatType::EAC:
if(compCount == 1)
@@ -390,9 +388,8 @@ texel.
else if(compCount == 2)
return 16; // two channel RG11 EAC
else
- return 16; // RGBA8 EAC
- case ResourceFormatType::ASTC:
- return 16; // ASTC is always 128 bits per block
+ return 16; // RGBA8 EAC
+ case ResourceFormatType::ASTC: return 16; // ASTC is always 128 bits per block
case ResourceFormatType::R10G10B10A2:
case ResourceFormatType::R11G11B10:
case ResourceFormatType::R9G9B9E5: return 4;
@@ -406,8 +403,7 @@ texel.
case ResourceFormatType::D32S8:
return 5; // we define the size as tightly packed, so 5 bytes.
case ResourceFormatType::S8:
- case ResourceFormatType::A8:
- return 1;
+ case ResourceFormatType::A8: return 1;
// can't give a sensible answer for YUV formats as the texel varies.
case ResourceFormatType::YUV8: return compCount;
case ResourceFormatType::YUV10:
diff --git a/renderdoc/api/replay/rdcstr.h b/renderdoc/api/replay/rdcstr.h
index ae153ef6d..a922396d8 100644
--- a/renderdoc/api/replay/rdcstr.h
+++ b/renderdoc/api/replay/rdcstr.h
@@ -979,8 +979,8 @@ class rdcinflexiblestr
#endif
}
-// we use tagged pointers on x86-64 to minimise storage. On other architecture this isn't safe
-// so we have to keep it separate. This is still a storage win over rdcstr
+ // we use tagged pointers on x86-64 to minimise storage. On other architecture this isn't safe
+ // so we have to keep it separate. This is still a storage win over rdcstr
#if defined(__x86_64__) || defined(_M_X64)
// use a signed pointer to sign-extend for canonical form
diff --git a/renderdoc/api/replay/renderdoc_replay.h b/renderdoc/api/replay/renderdoc_replay.h
index 7f36f74b7..d747b6660 100644
--- a/renderdoc/api/replay/renderdoc_replay.h
+++ b/renderdoc/api/replay/renderdoc_replay.h
@@ -48,8 +48,10 @@
// this #define can be used to mark a program as a 'replay' program which should not be captured.
// Any program used for such purpose must define and export this symbol in the main exe or one dll
// that will be loaded before renderdoc.dll is loaded.
-#define REPLAY_PROGRAM_MARKER() \
- extern "C" RENDERDOC_EXPORT_API void RENDERDOC_CC renderdoc__replay__marker() {}
+#define REPLAY_PROGRAM_MARKER() \
+ extern "C" RENDERDOC_EXPORT_API void RENDERDOC_CC renderdoc__replay__marker() \
+ { \
+ }
// declare ResourceId extremely early so that it can be referenced in structured_data.h
DOCUMENT("");
diff --git a/renderdoc/api/replay/replay_enums.h b/renderdoc/api/replay/replay_enums.h
index 551d5e92f..7b705039b 100644
--- a/renderdoc/api/replay/replay_enums.h
+++ b/renderdoc/api/replay/replay_enums.h
@@ -296,15 +296,19 @@ DOCUMENT(R"(Get the byte size of a variable type.
)");
constexpr uint32_t VarTypeByteSize(VarType type)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return (type == VarType::UByte || type == VarType::SByte) ? 1
- : (type == VarType::Half || type == VarType::UShort || type == VarType::SShort) ? 2
- : (type == VarType::Float || type == VarType::UInt || type == VarType::SInt || type == VarType::Bool || type == VarType::Enum) ? 4
- : (type == VarType::Double || type == VarType::ULong || type == VarType::SLong || type == VarType::GPUPointer) ? 8
- : 0;
- // clang-format on
+ return (type == VarType::UByte || type == VarType::SByte) ? 1
+
+ : (type == VarType::Half || type == VarType::UShort || type == VarType::SShort) ? 2
+
+ : (type == VarType::Float || type == VarType::UInt || type == VarType::SInt ||
+ type == VarType::Bool || type == VarType::Enum)
+ ? 4
+
+ : (type == VarType::Double || type == VarType::ULong || type == VarType::SLong ||
+ type == VarType::GPUPointer)
+ ? 8
+
+ : 0;
}
DOCUMENT(R"(Represents the component type of a channel in a texture or element in a structure.
@@ -388,20 +392,19 @@ DOCUMENT(R"(Get the component type of a variable type.
)");
constexpr CompType VarTypeCompType(VarType type)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return (type == VarType::Double || type == VarType::Float || type == VarType::Half) ? CompType::Float
+ return (type == VarType::Double || type == VarType::Float || type == VarType::Half)
+ ? CompType::Float
- : (type == VarType::ULong || type == VarType::UInt || type == VarType::UShort ||
- type == VarType::UByte || type == VarType::Bool || type == VarType::Enum ||
- type == VarType::GPUPointer) ? CompType::UInt
+ : (type == VarType::ULong || type == VarType::UInt || type == VarType::UShort ||
+ type == VarType::UByte || type == VarType::Bool || type == VarType::Enum ||
+ type == VarType::GPUPointer)
+ ? CompType::UInt
- : (type == VarType::SLong || type == VarType::SInt ||
- type == VarType::SShort || type == VarType::SByte) ? CompType::SInt
+ : (type == VarType::SLong || type == VarType::SInt || type == VarType::SShort ||
+ type == VarType::SByte)
+ ? CompType::SInt
- : CompType::Typeless;
- // clang-format on
+ : CompType::Typeless;
}
DOCUMENT(R"(A single source component for a destination texture swizzle.
@@ -1731,20 +1734,16 @@ DOCUMENT(R"(Get the GPUVendor for a given PCI Vendor ID.
)");
constexpr GPUVendor GPUVendorFromPCIVendor(uint32_t vendorID)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return vendorID == 0x13B5 ? GPUVendor::ARM
- : vendorID == 0x1002 ? GPUVendor::AMD
- : vendorID == 0x1010 ? GPUVendor::Imagination
- : vendorID == 0x8086 ? GPUVendor::Intel
- : vendorID == 0x10DE ? GPUVendor::nVidia
- : vendorID == 0x5143 ? GPUVendor::Qualcomm
- : vendorID == 0x1AE0 ? GPUVendor::Software // Google Swiftshader
- : vendorID == 0x1414 ? GPUVendor::Software // Microsoft WARP
- : vendorID == 0x144D ? GPUVendor::Samsung // Xclipse GPU
- : GPUVendor::Unknown;
- // clang-format on
+ return vendorID == 0x13B5 ? GPUVendor::ARM
+ : vendorID == 0x1002 ? GPUVendor::AMD
+ : vendorID == 0x1010 ? GPUVendor::Imagination
+ : vendorID == 0x8086 ? GPUVendor::Intel
+ : vendorID == 0x10DE ? GPUVendor::nVidia
+ : vendorID == 0x5143 ? GPUVendor::Qualcomm
+ : vendorID == 0x1AE0 ? GPUVendor::Software // Google Swiftshader
+ : vendorID == 0x1414 ? GPUVendor::Software // Microsoft WARP
+ : vendorID == 0x144D ? GPUVendor::Samsung // Xclipse GPU
+ : GPUVendor::Unknown;
}
DOCUMENT(R"(Identifies a Graphics API.
@@ -1948,23 +1947,19 @@ DOCUMENT(R"(Returns the default executable name with no suffix for a given :clas
)");
constexpr inline const char *ToolExecutable(KnownShaderTool tool)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return tool == KnownShaderTool::SPIRV_Cross ? "spirv-cross" :
- tool == KnownShaderTool::SPIRV_Cross_OpenGL ? "spirv-cross" :
- tool == KnownShaderTool::spirv_dis ? "spirv-dis" :
- tool == KnownShaderTool::spirv_dis_OpenGL ? "spirv-dis" :
- tool == KnownShaderTool::glslangValidatorGLSL ? "glslangValidator" :
- tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? "glslangValidator" :
- tool == KnownShaderTool::glslangValidatorHLSL ? "glslangValidator" :
- tool == KnownShaderTool::spirv_as ? "spirv-as" :
- tool == KnownShaderTool::spirv_as_OpenGL ? "spirv-as" :
- tool == KnownShaderTool::dxcSPIRV ? "dxc" :
- tool == KnownShaderTool::dxcDXIL ? "dxc" :
- tool == KnownShaderTool::fxc ? "fxc" :
- "";
- // clang-format on
+ return tool == KnownShaderTool::SPIRV_Cross ? "spirv-cross"
+ : tool == KnownShaderTool::SPIRV_Cross_OpenGL ? "spirv-cross"
+ : tool == KnownShaderTool::spirv_dis ? "spirv-dis"
+ : tool == KnownShaderTool::spirv_dis_OpenGL ? "spirv-dis"
+ : tool == KnownShaderTool::glslangValidatorGLSL ? "glslangValidator"
+ : tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? "glslangValidator"
+ : tool == KnownShaderTool::glslangValidatorHLSL ? "glslangValidator"
+ : tool == KnownShaderTool::spirv_as ? "spirv-as"
+ : tool == KnownShaderTool::spirv_as_OpenGL ? "spirv-as"
+ : tool == KnownShaderTool::dxcSPIRV ? "dxc"
+ : tool == KnownShaderTool::dxcDXIL ? "dxc"
+ : tool == KnownShaderTool::fxc ? "fxc"
+ : "";
}
DOCUMENT(R"(Returns the expected default input :class:`~renderdoc.ShaderEncoding` that a
@@ -1977,23 +1972,19 @@ tool.
)");
constexpr inline ShaderEncoding ToolInput(KnownShaderTool tool)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return tool == KnownShaderTool::SPIRV_Cross ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::SPIRV_Cross_OpenGL ? ShaderEncoding::OpenGLSPIRV :
- tool == KnownShaderTool::spirv_dis ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::spirv_dis_OpenGL ? ShaderEncoding::OpenGLSPIRV :
- tool == KnownShaderTool::glslangValidatorGLSL ? ShaderEncoding::GLSL :
- tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? ShaderEncoding::GLSL :
- tool == KnownShaderTool::glslangValidatorHLSL ? ShaderEncoding::HLSL :
- tool == KnownShaderTool::spirv_as ? ShaderEncoding::SPIRVAsm :
- tool == KnownShaderTool::spirv_as_OpenGL ? ShaderEncoding::OpenGLSPIRVAsm :
- tool == KnownShaderTool::dxcSPIRV ? ShaderEncoding::HLSL :
- tool == KnownShaderTool::dxcDXIL ? ShaderEncoding::HLSL :
- tool == KnownShaderTool::fxc ? ShaderEncoding::HLSL :
- ShaderEncoding::Unknown;
- // clang-format on
+ return tool == KnownShaderTool::SPIRV_Cross ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::SPIRV_Cross_OpenGL ? ShaderEncoding::OpenGLSPIRV
+ : tool == KnownShaderTool::spirv_dis ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::spirv_dis_OpenGL ? ShaderEncoding::OpenGLSPIRV
+ : tool == KnownShaderTool::glslangValidatorGLSL ? ShaderEncoding::GLSL
+ : tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? ShaderEncoding::GLSL
+ : tool == KnownShaderTool::glslangValidatorHLSL ? ShaderEncoding::HLSL
+ : tool == KnownShaderTool::spirv_as ? ShaderEncoding::SPIRVAsm
+ : tool == KnownShaderTool::spirv_as_OpenGL ? ShaderEncoding::OpenGLSPIRVAsm
+ : tool == KnownShaderTool::dxcSPIRV ? ShaderEncoding::HLSL
+ : tool == KnownShaderTool::dxcDXIL ? ShaderEncoding::HLSL
+ : tool == KnownShaderTool::fxc ? ShaderEncoding::HLSL
+ : ShaderEncoding::Unknown;
}
DOCUMENT(R"(Returns the expected default output :class:`~renderdoc.ShaderEncoding` that a
@@ -2006,23 +1997,19 @@ tool.
)");
constexpr inline ShaderEncoding ToolOutput(KnownShaderTool tool)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return tool == KnownShaderTool::SPIRV_Cross ? ShaderEncoding::GLSL :
- tool == KnownShaderTool::SPIRV_Cross_OpenGL ? ShaderEncoding::GLSL :
- tool == KnownShaderTool::spirv_dis ? ShaderEncoding::SPIRVAsm :
- tool == KnownShaderTool::spirv_dis_OpenGL ? ShaderEncoding::OpenGLSPIRVAsm :
- tool == KnownShaderTool::glslangValidatorGLSL ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? ShaderEncoding::OpenGLSPIRV :
- tool == KnownShaderTool::glslangValidatorHLSL ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::spirv_as ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::spirv_as_OpenGL ? ShaderEncoding::OpenGLSPIRV :
- tool == KnownShaderTool::dxcSPIRV ? ShaderEncoding::SPIRV :
- tool == KnownShaderTool::dxcDXIL ? ShaderEncoding::DXIL :
- tool == KnownShaderTool::fxc ? ShaderEncoding::DXBC :
- ShaderEncoding::Unknown;
- // clang-format on
+ return tool == KnownShaderTool::SPIRV_Cross ? ShaderEncoding::GLSL
+ : tool == KnownShaderTool::SPIRV_Cross_OpenGL ? ShaderEncoding::GLSL
+ : tool == KnownShaderTool::spirv_dis ? ShaderEncoding::SPIRVAsm
+ : tool == KnownShaderTool::spirv_dis_OpenGL ? ShaderEncoding::OpenGLSPIRVAsm
+ : tool == KnownShaderTool::glslangValidatorGLSL ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::glslangValidatorGLSL_OpenGL ? ShaderEncoding::OpenGLSPIRV
+ : tool == KnownShaderTool::glslangValidatorHLSL ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::spirv_as ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::spirv_as_OpenGL ? ShaderEncoding::OpenGLSPIRV
+ : tool == KnownShaderTool::dxcSPIRV ? ShaderEncoding::SPIRV
+ : tool == KnownShaderTool::dxcDXIL ? ShaderEncoding::DXIL
+ : tool == KnownShaderTool::fxc ? ShaderEncoding::DXBC
+ : ShaderEncoding::Unknown;
}
DOCUMENT(R"(Check whether or not this is a human readable text representation.
diff --git a/renderdoc/api/replay/stringise.h b/renderdoc/api/replay/stringise.h
index 0c682a16e..8dd03b52d 100644
--- a/renderdoc/api/replay/stringise.h
+++ b/renderdoc/api/replay/stringise.h
@@ -55,7 +55,7 @@ rdcstr ToStr(const T &el)
constexpr rdcliteral empty_ret = STRING_LITERAL(#type "(0)"); \
static_assert(std::is_same::value, \
"Type in macro doesn't match el"); \
- (void)(enumType) el; \
+ (void)(enumType)el; \
switch(el) \
{ \
default: break;
@@ -89,7 +89,7 @@ rdcstr ToStr(const T &el)
static_assert(std::is_same::value, \
"Type in macro doesn't match el"); \
uint64_t local = (uint64_t)el; \
- (void)(enumType) el; \
+ (void)(enumType)el; \
rdcstr ret;
#define STRINGISE_BITFIELD_VALUE(b) \
diff --git a/renderdoc/api/replay/version.h b/renderdoc/api/replay/version.h
index ba8e006be..30f3065b0 100644
--- a/renderdoc/api/replay/version.h
+++ b/renderdoc/api/replay/version.h
@@ -65,13 +65,13 @@ extern "C" const char GitVersionHash[41];
// The friendly name of the distribution that packaged this build
#if !defined(DISTRIBUTION_NAME)
-//#define DISTRIBUTION_NAME "DistributionName"
+// #define DISTRIBUTION_NAME "DistributionName"
#endif
// An arbitrary distribution version string. If set, this should include the major and minor
// version numbers in it.
#if !defined(DISTRIBUTION_VERSION)
-//#define DISTRIBUTION_VERSION "MAJ.MIN-foo.4b"
+// #define DISTRIBUTION_VERSION "MAJ.MIN-foo.4b"
#endif
// Set to an URL or email of who produced this build and should be the first point of contact for
@@ -79,7 +79,7 @@ extern "C" const char GitVersionHash[41];
// If you're distributing builds for the public then do update this to point to your bugtracker or
// similar.
#if !defined(DISTRIBUTION_CONTACT)
-//#define DISTRIBUTION_CONTACT "https://distribution.example/packages/renderdoc"
+// #define DISTRIBUTION_CONTACT "https://distribution.example/packages/renderdoc"
#endif
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/renderdoc/common/dds_readwrite.cpp b/renderdoc/common/dds_readwrite.cpp
index 74454b661..ed89c0356 100644
--- a/renderdoc/common/dds_readwrite.cpp
+++ b/renderdoc/common/dds_readwrite.cpp
@@ -1017,8 +1017,7 @@ RDResult load_dds_from_file(StreamReader *reader, read_dds_data &ret)
ret.format = DXGIFormat2ResourceFormat(headerDXT10.dxgiFormat);
if(ret.format.type == ResourceFormatType::Undefined)
{
- RETURN_ERROR_RESULT(ResultCode::ImageUnsupported,
- "Unsupported DXGI_FORMAT %u loaded from DDS",
+ RETURN_ERROR_RESULT(ResultCode::ImageUnsupported, "Unsupported DXGI_FORMAT %u loaded from DDS",
uint32_t(headerDXT10.dxgiFormat));
}
}
@@ -1117,8 +1116,10 @@ RDResult load_dds_from_file(StreamReader *reader, read_dds_data &ret)
else
{
const uint32_t bits[] = {
- Bits::CountOnes(header.ddspf.dwRBitMask), Bits::CountOnes(header.ddspf.dwGBitMask),
- Bits::CountOnes(header.ddspf.dwBBitMask), Bits::CountOnes(header.ddspf.dwABitMask),
+ Bits::CountOnes(header.ddspf.dwRBitMask),
+ Bits::CountOnes(header.ddspf.dwGBitMask),
+ Bits::CountOnes(header.ddspf.dwBBitMask),
+ Bits::CountOnes(header.ddspf.dwABitMask),
};
if((bits[1] != 0 && bits[1] != bits[0]) || (bits[2] != 0 && bits[2] != bits[0]) ||
(bits[3] != 0 && bits[3] != bits[0]))
diff --git a/renderdoc/common/wrapped_pool.h b/renderdoc/common/wrapped_pool.h
index 2adb3941b..189e84675 100644
--- a/renderdoc/common/wrapped_pool.h
+++ b/renderdoc/common/wrapped_pool.h
@@ -167,7 +167,7 @@ private:
}
~ItemPool()
{
- delete[](uint8_t *) items;
+ delete[](uint8_t *)items;
delete[] freeStack;
}
void *Allocate()
@@ -214,12 +214,21 @@ private:
friend typename FriendMaker::Type;
};
-#define ALLOCATE_WITH_WRAPPED_POOL(...) \
- typedef WrappingPool<__VA_ARGS__> PoolType; \
- static PoolType m_Pool; \
- void *operator new(size_t sz) { return m_Pool.Allocate(); } \
- void operator delete(void *p) { m_Pool.Deallocate(p); } \
- static bool IsAlloc(const void *p) { return m_Pool.IsAlloc(p); }
+#define ALLOCATE_WITH_WRAPPED_POOL(...) \
+ typedef WrappingPool<__VA_ARGS__> PoolType; \
+ static PoolType m_Pool; \
+ void *operator new(size_t sz) \
+ { \
+ return m_Pool.Allocate(); \
+ } \
+ void operator delete(void *p) \
+ { \
+ m_Pool.Deallocate(p); \
+ } \
+ static bool IsAlloc(const void *p) \
+ { \
+ return m_Pool.IsAlloc(p); \
+ }
#define WRAPPED_POOL_INST(a) \
a::PoolType a::m_Pool; \
DECLARE_STRINGISE_TYPE(a);
diff --git a/renderdoc/core/core.h b/renderdoc/core/core.h
index 7d873946b..ba4a5e125 100644
--- a/renderdoc/core/core.h
+++ b/renderdoc/core/core.h
@@ -296,11 +296,10 @@ ITERABLE_OPERATORS(LoadProgress);
inline constexpr float ProgressWeight(LoadProgress section)
{
// values must sum to 1.0
- return section == LoadProgress::DebugManagerInit
- ? 0.1f
- : section == LoadProgress::FileInitialRead
- ? 0.75f
- : section == LoadProgress::FrameEventsRead ? 0.15f : 0.0f;
+ return section == LoadProgress::DebugManagerInit ? 0.1f
+ : section == LoadProgress::FileInitialRead ? 0.75f
+ : section == LoadProgress::FrameEventsRead ? 0.15f
+ : 0.0f;
}
enum class CaptureProgress
@@ -331,17 +330,13 @@ ITERABLE_OPERATORS(CaptureProgress);
inline constexpr float ProgressWeight(CaptureProgress section)
{
// values must sum to 1.0
- return section == CaptureProgress::PrepareInitialStates
- ? 0.25f
- : section == CaptureProgress::AddReferencedResources
- ? 0.25f
- : section == CaptureProgress::FrameCapture
- ? 0.15f
- : section == CaptureProgress::SerialiseInitialStates
- ? 0.25f
- : section == CaptureProgress::SerialiseFrameContents
- ? 0.08f
- : section == CaptureProgress::FileWriting ? 0.02f : 0.0f;
+ return section == CaptureProgress::PrepareInitialStates ? 0.25f
+ : section == CaptureProgress::AddReferencedResources ? 0.25f
+ : section == CaptureProgress::FrameCapture ? 0.15f
+ : section == CaptureProgress::SerialiseInitialStates ? 0.25f
+ : section == CaptureProgress::SerialiseFrameContents ? 0.08f
+ : section == CaptureProgress::FileWriting ? 0.02f
+ : 0.0f;
}
// utility function to fake progress with x going from 0 to infinity, mapping to 0% to 100% in an
diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp
index 1c043d42f..c50197c1d 100644
--- a/renderdoc/core/replay_proxy.cpp
+++ b/renderdoc/core/replay_proxy.cpp
@@ -184,7 +184,7 @@ struct RemoteExecution
#define REMOTE_EXECUTION() RemoteExecution exec(this);
// uncomment the following to print verbose debugging prints for the remote proxy packets
-//#define PROXY_DEBUG(...) RDCDEBUG(__VA_ARGS__)
+// #define PROXY_DEBUG(...) RDCDEBUG(__VA_ARGS__)
#if !defined(PROXY_DEBUG)
#define PROXY_DEBUG(...) \
diff --git a/renderdoc/core/settings.h b/renderdoc/core/settings.h
index 5f92567cc..a0056757f 100644
--- a/renderdoc/core/settings.h
+++ b/renderdoc/core/settings.h
@@ -58,7 +58,10 @@ CONFIG_SUPPORT_TYPE(rdcarray);
#define RDOC_CONFIG(type, name, defaultValue, description) \
static ConfigVarRegistration CONCAT(config, __LINE__)( \
STRING_LITERAL(STRINGIZE(name)), defaultValue, false, STRING_LITERAL(description)); \
- const type &name() { return CONCAT(config, __LINE__).value(); }
+ const type &name() \
+ { \
+ return CONCAT(config, __LINE__).value(); \
+ }
#define RDOC_EXTERN_CONFIG(type, name) extern const type &name();
// debug configs get set to constants in official stable builds, they will remain configurable
@@ -78,5 +81,8 @@ CONFIG_SUPPORT_TYPE(rdcarray);
#define RDOC_DEBUG_CONFIG(type, name, defaultValue, description) \
static ConfigVarRegistration CONCAT(config, __LINE__)( \
STRING_LITERAL(STRINGIZE(name)), defaultValue, true, STRING_LITERAL(description)); \
- const type &name() { return CONCAT(config, __LINE__).value(); }
+ const type &name() \
+ { \
+ return CONCAT(config, __LINE__).value(); \
+ }
#endif
diff --git a/renderdoc/core/sparse_page_table.cpp b/renderdoc/core/sparse_page_table.cpp
index 98888efb3..c33fcf025 100644
--- a/renderdoc/core/sparse_page_table.cpp
+++ b/renderdoc/core/sparse_page_table.cpp
@@ -859,7 +859,8 @@ Coord PageTable::calcSubresourcePageDim(uint32_t subresource) const
const uint32_t mipLevel = subresource % m_MipCount;
const Sparse::Coord mipDim = {
- RDCMAX(1U, m_TextureDim.x >> mipLevel), RDCMAX(1U, m_TextureDim.y >> mipLevel),
+ RDCMAX(1U, m_TextureDim.x >> mipLevel),
+ RDCMAX(1U, m_TextureDim.y >> mipLevel),
RDCMAX(1U, m_TextureDim.z >> mipLevel),
};
diff --git a/renderdoc/core/target_control.cpp b/renderdoc/core/target_control.cpp
index 716e6c38a..08dd2520b 100644
--- a/renderdoc/core/target_control.cpp
+++ b/renderdoc/core/target_control.cpp
@@ -887,8 +887,7 @@ public:
m_API = ToStr(driver);
RDCLOG("Used API: %s (%s & %s)", msg.apiUse.name.c_str(),
- presenting ? "Presenting" : "Not presenting",
- supported ? "supported" : "not supported");
+ presenting ? "Presenting" : "Not presenting", supported ? "supported" : "not supported");
if(!supportMessage.empty())
{
diff --git a/renderdoc/data/glsl/array2ms.comp b/renderdoc/data/glsl/array2ms.comp
index f58ea1653..ad2646b17 100644
--- a/renderdoc/data/glsl/array2ms.comp
+++ b/renderdoc/data/glsl/array2ms.comp
@@ -77,7 +77,7 @@ void main()
int sampleIdx = sampleOffset + int(id.z % numMultiSamples);
uvec4 data =
- texelFetch(srcArray, ivec3(int(id.x), int(id.y), slice *numMultiSamples + sampleIdx), 0);
+ texelFetch(srcArray, ivec3(int(id.x), int(id.y), slice * numMultiSamples + sampleIdx), 0);
imageStore(dstMS, ivec3(int(id.x), int(id.y), slice), sampleIdx, data);
}
diff --git a/renderdoc/data/glsl/deptharr2ms.frag b/renderdoc/data/glsl/deptharr2ms.frag
index 5ecb7c296..62c9c6a7b 100644
--- a/renderdoc/data/glsl/deptharr2ms.frag
+++ b/renderdoc/data/glsl/deptharr2ms.frag
@@ -68,7 +68,7 @@ uniform ivec4 mscopy;
void main()
{
ivec3 srcCoord =
- ivec3(int(gl_FragCoord.x), int(gl_FragCoord.y), currentSlice *numMultiSamples + gl_SampleID);
+ ivec3(int(gl_FragCoord.x), int(gl_FragCoord.y), currentSlice * numMultiSamples + gl_SampleID);
if(currentStencil < 256u)
{
diff --git a/renderdoc/data/glsl/vk_depthbuf2ms.frag b/renderdoc/data/glsl/vk_depthbuf2ms.frag
index e803636fc..bb43502d7 100644
--- a/renderdoc/data/glsl/vk_depthbuf2ms.frag
+++ b/renderdoc/data/glsl/vk_depthbuf2ms.frag
@@ -56,7 +56,7 @@ mscopy;
void main()
{
ivec3 srcCoord =
- ivec3(int(gl_FragCoord.x), int(gl_FragCoord.y), currentSlice *numMultiSamples + gl_SampleID);
+ ivec3(int(gl_FragCoord.x), int(gl_FragCoord.y), currentSlice * numMultiSamples + gl_SampleID);
uint idx = srcCoord.x + textureWidth * (srcCoord.y + (textureHeight * srcCoord.z));
float depth = 0;
diff --git a/renderdoc/data/glsl/vk_texsample.h b/renderdoc/data/glsl/vk_texsample.h
index 2d378eb83..fa3a66930 100644
--- a/renderdoc/data/glsl/vk_texsample.h
+++ b/renderdoc/data/glsl/vk_texsample.h
@@ -125,11 +125,20 @@ vec4 SampleTextureFloat4(int type, vec2 pos, float slice, int mipLevel, int samp
float data[] = {
// plane 0
- col.x, col.y, col.z, col.w,
+ col.x,
+ col.y,
+ col.z,
+ col.w,
// plane 1
- col2.x, col2.y, col2.z, col2.w,
+ col2.x,
+ col2.y,
+ col2.z,
+ col2.w,
// plane 3
- col3.x, col3.y, col3.z, col3.w,
+ col3.x,
+ col3.y,
+ col3.z,
+ col3.w,
};
col = vec4(0, 0, 0, 1);
diff --git a/renderdoc/data/glsl_shaders.cpp b/renderdoc/data/glsl_shaders.cpp
index 65f137e80..a0339c6fb 100644
--- a/renderdoc/data/glsl_shaders.cpp
+++ b/renderdoc/data/glsl_shaders.cpp
@@ -111,10 +111,9 @@ rdcstr GenerateGLSLShader(const rdcstr &shader, ShaderType type, int version, co
combined += shader;
const char *c_src = combined.c_str();
- glslang::EShClient client =
- type == ShaderType::Vulkan ? glslang::EShClientVulkan : type == ShaderType::GLSPIRV
- ? glslang::EShClientOpenGL
- : glslang::EShClientNone;
+ glslang::EShClient client = type == ShaderType::Vulkan ? glslang::EShClientVulkan
+ : type == ShaderType::GLSPIRV ? glslang::EShClientOpenGL
+ : glslang::EShClientNone;
glslang::EShTargetClientVersion targetversion =
type == ShaderType::Vulkan ? glslang::EShTargetVulkan_1_0 : glslang::EShTargetOpenGL_450;
int inputVersion = client != glslang::EShClientNone ? 100 : 0;
diff --git a/renderdoc/data/hlsl/histogram.hlsl b/renderdoc/data/hlsl/histogram.hlsl
index a626692e1..84bcce380 100644
--- a/renderdoc/data/hlsl/histogram.hlsl
+++ b/renderdoc/data/hlsl/histogram.hlsl
@@ -37,8 +37,7 @@ RWBuffer MinMaxDestInt : register(u2);
[numthreads(HGRAM_TILES_PER_BLOCK, HGRAM_TILES_PER_BLOCK, 1)] void RENDERDOC_TileMinMaxCS(
uint3 tid
: SV_GroupThreadID, uint3 gid
- : SV_GroupID)
-{
+ : SV_GroupID) {
uint texType = SHADER_RESTYPE;
uint3 texDim = uint3(HistogramTextureResolution);
@@ -155,8 +154,7 @@ RWBuffer MinMaxResultDestFloat : register(u0);
RWBuffer MinMaxResultDestUInt : register(u1);
RWBuffer MinMaxResultDestInt : register(u2);
-[numthreads(1, 1, 1)] void RENDERDOC_ResultMinMaxCS()
-{
+[numthreads(1, 1, 1)] void RENDERDOC_ResultMinMaxCS() {
uint3 texDim = uint3(HistogramTextureResolution);
uint blocksX = (int)ceil(float(texDim.x) / float(HGRAM_PIXELS_PER_TILE * HGRAM_TILES_PER_BLOCK));
@@ -219,8 +217,7 @@ RWBuffer HistogramDest : register(u0);
[numthreads(HGRAM_TILES_PER_BLOCK, HGRAM_TILES_PER_BLOCK, 1)] void RENDERDOC_HistogramCS(
uint3 tid
: SV_GroupThreadID, uint3 gid
- : SV_GroupID)
-{
+ : SV_GroupID) {
uint texType = SHADER_RESTYPE;
uint3 texDim = uint3(HistogramTextureResolution);
diff --git a/renderdoc/data/hlsl/mesh.hlsl b/renderdoc/data/hlsl/mesh.hlsl
index c326921e8..75c6a0934 100644
--- a/renderdoc/data/hlsl/mesh.hlsl
+++ b/renderdoc/data/hlsl/mesh.hlsl
@@ -71,8 +71,7 @@ cbuffer viewportCBuf : register(b0)
};
[maxvertexcount(3)] void RENDERDOC_TriangleSizeGS(triangle meshV2F input[3],
- inout TriangleStream TriStream)
-{
+ inout TriangleStream TriStream) {
triSizeV2F output;
float2 a = input[0].pos.xy / input[0].pos.w;
@@ -100,14 +99,14 @@ cbuffer viewportCBuf : register(b0)
TriStream.RestartStrip();
}
-float4 RENDERDOC_TriangleSizePS(triSizeV2F IN) : SV_Target0
+float4 RENDERDOC_TriangleSizePS(triSizeV2F IN)
+ : SV_Target0
{
return float4(max(IN.pixarea, 0.001f).xxx, 1.0f);
}
[maxvertexcount(3)] void RENDERDOC_MeshGS(triangle meshV2F input[3],
- inout TriangleStream TriStream)
-{
+ inout TriangleStream TriStream) {
meshV2F output;
float4 faceEdgeA = mul(input[1].pos, InvProj) - mul(input[0].pos, InvProj);
@@ -124,7 +123,8 @@ float4 RENDERDOC_TriangleSizePS(triSizeV2F IN) : SV_Target0
TriStream.RestartStrip();
}
-float4 RENDERDOC_MeshPS(meshV2F IN) : SV_Target0
+float4 RENDERDOC_MeshPS(meshV2F IN)
+ : SV_Target0
{
uint type = MeshDisplayFormat;
@@ -306,8 +306,8 @@ void defaultPath(uint threadID)
}
}
-[numthreads(1024, 1, 1)] void RENDERDOC_MeshPickCS(uint3 tid : SV_DispatchThreadID)
-{
+[numthreads(1024, 1, 1)] void RENDERDOC_MeshPickCS(uint3 tid
+ : SV_DispatchThreadID) {
if(PickMeshMode == MESH_OTHER)
{
defaultPath(tid.x);
diff --git a/renderdoc/data/hlsl/pixelhistory.hlsl b/renderdoc/data/hlsl/pixelhistory.hlsl
index 43fd7e742..6f1caa450 100644
--- a/renderdoc/data/hlsl/pixelhistory.hlsl
+++ b/renderdoc/data/hlsl/pixelhistory.hlsl
@@ -59,12 +59,11 @@ RWBuffer copyout_float : register(u1);
RWBuffer copyout_uint : register(u2);
RWBuffer copyout_int : register(u3);
-[numthreads(1, 1, 1)] void RENDERDOC_PixelHistoryUnused()
-{
+[numthreads(1, 1, 1)] void RENDERDOC_PixelHistoryUnused() {
copyout_depth[dst_slot] = float4(-1.0f, -1.0f, 0.0f, 0.0f);
}
-[numthreads(1, 1, 1)] void RENDERDOC_PixelHistoryCopyPixel()
+ [numthreads(1, 1, 1)] void RENDERDOC_PixelHistoryCopyPixel()
{
if(multisampled)
{
diff --git a/renderdoc/data/hlsl/shaderdebug.hlsl b/renderdoc/data/hlsl/shaderdebug.hlsl
index 8f0428390..0435c64aa 100644
--- a/renderdoc/data/hlsl/shaderdebug.hlsl
+++ b/renderdoc/data/hlsl/shaderdebug.hlsl
@@ -33,8 +33,7 @@ struct OutStruct
RWStructuredBuffer outBuf : register(u1);
-[numthreads(1, 1, 1)] void RENDERDOC_DebugMathOp()
-{
+[numthreads(1, 1, 1)] void RENDERDOC_DebugMathOp() {
switch(mathOp)
{
case DEBUG_SAMPLE_MATH_RCP: outBuf[0].outf[0] = rcp(mathInVal); break;
diff --git a/renderdoc/data/hlsl/text.hlsl b/renderdoc/data/hlsl/text.hlsl
index 01392cec3..52025ce7d 100644
--- a/renderdoc/data/hlsl/text.hlsl
+++ b/renderdoc/data/hlsl/text.hlsl
@@ -69,7 +69,10 @@ v2f RENDERDOC_TextVS(uint vid : SV_VertexID, uint inst : SV_InstanceID)
{
// easy-mode on FL10 and up, use vertex/instance index
float2 verts[] = {
- float2(0.0, 0.0), float2(1.0, 0.0), float2(0.0, 1.0), float2(1.0, 1.0),
+ float2(0.0, 0.0),
+ float2(1.0, 0.0),
+ float2(0.0, 1.0),
+ float2(1.0, 1.0),
};
return Text(verts[vid], int(inst), chars[inst].x);
diff --git a/renderdoc/driver/d3d11/d3d11_context.cpp b/renderdoc/driver/d3d11/d3d11_context.cpp
index 54daa219b..314fb0728 100644
--- a/renderdoc/driver/d3d11/d3d11_context.cpp
+++ b/renderdoc/driver/d3d11/d3d11_context.cpp
@@ -385,8 +385,10 @@ bool WrappedID3D11DeviceContext::Serialise_BeginCaptureFrame(SerialiserType &ser
SAFE_RELEASE(so.query);
D3D11_QUERY queryTypes[] = {
- D3D11_QUERY_SO_STATISTICS_STREAM0, D3D11_QUERY_SO_STATISTICS_STREAM1,
- D3D11_QUERY_SO_STATISTICS_STREAM2, D3D11_QUERY_SO_STATISTICS_STREAM3,
+ D3D11_QUERY_SO_STATISTICS_STREAM0,
+ D3D11_QUERY_SO_STATISTICS_STREAM1,
+ D3D11_QUERY_SO_STATISTICS_STREAM2,
+ D3D11_QUERY_SO_STATISTICS_STREAM3,
};
D3D11_QUERY_DESC qdesc;
@@ -694,10 +696,7 @@ bool WrappedID3D11DeviceContext::IsFL11_1()
bool WrappedID3D11DeviceContext::ProcessChunk(ReadSerialiser &ser, D3D11Chunk chunk)
{
- SERIALISE_ELEMENT(m_CurContextId)
- .Named("Context"_lit)
- .TypedAs("ID3D11DeviceContext *"_lit)
- .Unimportant();
+ SERIALISE_ELEMENT(m_CurContextId).Named("Context"_lit).TypedAs("ID3D11DeviceContext *"_lit).Unimportant();
SERIALISE_CHECK_READ_ERRORS();
@@ -899,9 +898,7 @@ bool WrappedID3D11DeviceContext::ProcessChunk(ReadSerialiser &ser, D3D11Chunk ch
ret = Serialise_SwapDeviceContextState(ser, NULL, NULL);
break;
- case D3D11Chunk::SwapchainPresent:
- ret = Serialise_Present(ser, 0, 0);
- break;
+ case D3D11Chunk::SwapchainPresent: ret = Serialise_Present(ser, 0, 0); break;
// in order to get a warning if we miss a case, we explicitly handle the device creation chunks
// here. If we actually encounter one it's an error (we shouldn't see these inside the captured
diff --git a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp
index 90d3eefda..16029fe8b 100644
--- a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp
+++ b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp
@@ -2234,8 +2234,10 @@ bool WrappedID3D11DeviceContext::Serialise_SOSetTargets(SerialiserType &ser, UIN
SAFE_RELEASE(so.query);
D3D11_QUERY queryTypes[] = {
- D3D11_QUERY_SO_STATISTICS_STREAM0, D3D11_QUERY_SO_STATISTICS_STREAM1,
- D3D11_QUERY_SO_STATISTICS_STREAM2, D3D11_QUERY_SO_STATISTICS_STREAM3,
+ D3D11_QUERY_SO_STATISTICS_STREAM0,
+ D3D11_QUERY_SO_STATISTICS_STREAM1,
+ D3D11_QUERY_SO_STATISTICS_STREAM2,
+ D3D11_QUERY_SO_STATISTICS_STREAM3,
};
D3D11_QUERY_DESC qdesc;
@@ -2351,8 +2353,10 @@ void WrappedID3D11DeviceContext::SOSetTargets(UINT NumBuffers, ID3D11Buffer *con
SAFE_RELEASE(so.query);
D3D11_QUERY queryTypes[] = {
- D3D11_QUERY_SO_STATISTICS_STREAM0, D3D11_QUERY_SO_STATISTICS_STREAM1,
- D3D11_QUERY_SO_STATISTICS_STREAM2, D3D11_QUERY_SO_STATISTICS_STREAM3,
+ D3D11_QUERY_SO_STATISTICS_STREAM0,
+ D3D11_QUERY_SO_STATISTICS_STREAM1,
+ D3D11_QUERY_SO_STATISTICS_STREAM2,
+ D3D11_QUERY_SO_STATISTICS_STREAM3,
};
D3D11_QUERY_DESC qdesc;
diff --git a/renderdoc/driver/d3d11/d3d11_debug.cpp b/renderdoc/driver/d3d11/d3d11_debug.cpp
index c12af99ca..c938e37db 100644
--- a/renderdoc/driver/d3d11/d3d11_debug.cpp
+++ b/renderdoc/driver/d3d11/d3d11_debug.cpp
@@ -1232,7 +1232,8 @@ void D3D11Replay::MeshRendering::Init(WrappedID3D11Device *device)
{
// these elements are just for signature matching sake, so we don't need correct offsets/slots
D3D11_INPUT_ELEMENT_DESC inputDescSecondary[2] = {
- {"pos", 0, DXGI_FORMAT_R32G32B32A32_FLOAT}, {"sec", 0, DXGI_FORMAT_R8G8B8A8_UNORM},
+ {"pos", 0, DXGI_FORMAT_R32G32B32A32_FLOAT},
+ {"sec", 0, DXGI_FORMAT_R8G8B8A8_UNORM},
};
rdcstr meshhlsl = GetEmbeddedResource(mesh_hlsl);
diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp
index be37dfde3..d1e6ff68d 100644
--- a/renderdoc/driver/d3d11/d3d11_device.cpp
+++ b/renderdoc/driver/d3d11/d3d11_device.cpp
@@ -1211,8 +1211,7 @@ bool WrappedID3D11Device::ProcessChunk(ReadSerialiser &ser, D3D11Chunk context)
case D3D11Chunk::PostExecuteCommandList:
case D3D11Chunk::PostFinishCommandListSet:
case D3D11Chunk::SwapDeviceContextState:
- case D3D11Chunk::SwapchainPresent:
- return m_pImmediateContext->ProcessChunk(ser, context);
+ case D3D11Chunk::SwapchainPresent: return m_pImmediateContext->ProcessChunk(ser, context);
// no explicit default so that we have compiler warnings if a chunk isn't explicitly handled.
case D3D11Chunk::Max: break;
@@ -2317,8 +2316,9 @@ bool WrappedID3D11Device::EndFrameCapture(DeviceOwnedWindow devWnd)
m_TextRenderer->SetOutputWindow(swapper->GetHWND());
m_TextRenderer->RenderText(
- 0.0f, 0.0f, StringFormat::Fmt("Failed to capture frame %u: %s",
- m_CapturedFrames.back().frameNumber, reasonString));
+ 0.0f, 0.0f,
+ StringFormat::Fmt("Failed to capture frame %u: %s", m_CapturedFrames.back().frameNumber,
+ reasonString));
}
old.ApplyState(m_pImmediateContext);
diff --git a/renderdoc/driver/d3d11/d3d11_overlay.cpp b/renderdoc/driver/d3d11/d3d11_overlay.cpp
index c9c53d0bf..389118865 100644
--- a/renderdoc/driver/d3d11/d3d11_overlay.cpp
+++ b/renderdoc/driver/d3d11/d3d11_overlay.cpp
@@ -852,10 +852,8 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
/*StencilEnable =*/FALSE,
/*StencilReadMask =*/D3D11_DEFAULT_STENCIL_READ_MASK,
/*StencilWriteMask =*/D3D11_DEFAULT_STENCIL_WRITE_MASK,
- /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
- /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
+ /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
+ /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
};
ID3D11DepthStencilState *ds = NULL;
@@ -1093,10 +1091,8 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
/*StencilEnable =*/FALSE,
/*StencilReadMask =*/D3D11_DEFAULT_STENCIL_READ_MASK,
/*StencilWriteMask =*/D3D11_DEFAULT_STENCIL_WRITE_MASK,
- /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
- /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
+ /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
+ /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
};
ID3D11DepthStencilState *ds = NULL;
diff --git a/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp b/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp
index 13931636f..9599b314c 100644
--- a/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp
+++ b/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp
@@ -1529,10 +1529,8 @@ rdcarray D3D11Replay::PixelHistory(rdcarray event
/*StencilEnable =*/FALSE,
/*StencilReadMask =*/D3D11_DEFAULT_STENCIL_READ_MASK,
/*StencilWriteMask =*/D3D11_DEFAULT_STENCIL_WRITE_MASK,
- /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
- /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP,
- D3D11_COMPARISON_ALWAYS},
+ /*FrontFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
+ /*BackFace =*/{D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS},
};
if(curDS)
@@ -1825,9 +1823,8 @@ rdcarray D3D11Replay::PixelHistory(rdcarray event
break;
}
- if(!mod.backfaceCulled &&
- (flags[i] & (TestEnabled_Scissor | TestMustPass_Scissor | TestMustFail_Scissor)) ==
- TestEnabled_Scissor)
+ if(!mod.backfaceCulled && (flags[i] & (TestEnabled_Scissor | TestMustPass_Scissor |
+ TestMustFail_Scissor)) == TestEnabled_Scissor)
{
do
{
@@ -2069,10 +2066,12 @@ rdcarray D3D11Replay::PixelHistory(rdcarray event
/*StencilEnable =*/TRUE,
/*StencilReadMask =*/D3D11_DEFAULT_STENCIL_READ_MASK,
/*StencilWriteMask =*/D3D11_DEFAULT_STENCIL_WRITE_MASK,
- /*FrontFace =*/{D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT,
- D3D11_STENCIL_OP_INCR_SAT, D3D11_COMPARISON_GREATER_EQUAL},
- /*BackFace =*/{D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT,
- D3D11_STENCIL_OP_INCR_SAT, D3D11_COMPARISON_GREATER_EQUAL},
+ /*FrontFace =*/
+ {D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT,
+ D3D11_COMPARISON_GREATER_EQUAL},
+ /*BackFace =*/
+ {D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT, D3D11_STENCIL_OP_INCR_SAT,
+ D3D11_COMPARISON_GREATER_EQUAL},
};
if(curDS)
{
diff --git a/renderdoc/driver/d3d11/d3d11_rendermesh.cpp b/renderdoc/driver/d3d11/d3d11_rendermesh.cpp
index 124ffc987..ddd2ef99f 100644
--- a/renderdoc/driver/d3d11/d3d11_rendermesh.cpp
+++ b/renderdoc/driver/d3d11/d3d11_rendermesh.cpp
@@ -392,9 +392,8 @@ void D3D11Replay::RenderMesh(uint32_t eventId, const rdcarray &secon
// will be N*M long, N adjacent prims of M verts each. M = primSize below
rdcarray adjacentPrimVertices;
- D3D11_PRIMITIVE_TOPOLOGY primTopo =
- D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST; // tri or line list
- uint32_t primSize = 3; // number of verts per primitive
+ D3D11_PRIMITIVE_TOPOLOGY primTopo = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST; // tri or line list
+ uint32_t primSize = 3; // number of verts per primitive
if(meshtopo == D3D11_PRIMITIVE_TOPOLOGY_LINELIST ||
meshtopo == D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ ||
@@ -492,7 +491,10 @@ void D3D11Replay::RenderMesh(uint32_t eventId, const rdcarray &secon
m_pImmediateContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
FloatVector vertSprite[4] = {
- activeVertex, activeVertex, activeVertex, activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
};
hr = m_pImmediateContext->Map(m_MeshRender.TriHighlightHelper, 0, D3D11_MAP_WRITE_DISCARD, 0,
diff --git a/renderdoc/driver/d3d11/d3d11_rendertext.cpp b/renderdoc/driver/d3d11/d3d11_rendertext.cpp
index d7e72a4e8..8d9e078d8 100644
--- a/renderdoc/driver/d3d11/d3d11_rendertext.cpp
+++ b/renderdoc/driver/d3d11/d3d11_rendertext.cpp
@@ -34,7 +34,10 @@
#include "data/hlsl/hlsl_cbuffers.h"
static Vec2f quadPos[] = {
- Vec2f(0.0f, 0.0f), Vec2f(1.0f, 0.0f), Vec2f(0.0f, 1.0f), Vec2f(1.0f, 1.0f),
+ Vec2f(0.0f, 0.0f),
+ Vec2f(1.0f, 0.0f),
+ Vec2f(0.0f, 1.0f),
+ Vec2f(1.0f, 1.0f),
};
// see d3d11_debug.cpp D3D11DebugManager::D3D11DebugManager for why we use this helper like this
diff --git a/renderdoc/driver/d3d11/d3d11_replay.cpp b/renderdoc/driver/d3d11/d3d11_replay.cpp
index 56b0eaea7..ad547c87b 100644
--- a/renderdoc/driver/d3d11/d3d11_replay.cpp
+++ b/renderdoc/driver/d3d11/d3d11_replay.cpp
@@ -3942,9 +3942,8 @@ bool D3D11Replay::IsTextureSupported(const TextureDescription &tex)
return false;
if(tex.dimension == 3 && (supp & D3D11_FORMAT_SUPPORT_TEXTURE3D) == 0)
return false;
- if(tex.msSamp > 1 &&
- (supp &
- (D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET)) == 0)
+ if(tex.msSamp > 1 && (supp & (D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD |
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET)) == 0)
return false;
return true;
@@ -4192,16 +4191,16 @@ RDResult D3D11_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, IRepl
"Capture requires ags to replay, but it's not available or can't be initialised");
}
- CreateDeviceAndSwapChain = [agsDev](
- IDXGIAdapter *pAdapter, D3D_DRIVER_TYPE DriverType, HMODULE Software, UINT Flags,
- CONST D3D_FEATURE_LEVEL *pFeatureLevels, UINT FeatureLevels, UINT SDKVersion,
- CONST DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, IDXGISwapChain **ppSwapChain,
- ID3D11Device **ppDevice, D3D_FEATURE_LEVEL *pFeatureLevel,
- ID3D11DeviceContext **ppImmediateContext) {
- return agsDev->CreateD3D11(pAdapter, DriverType, Software, Flags, pFeatureLevels,
- FeatureLevels, SDKVersion, pSwapChainDesc, ppSwapChain, ppDevice,
- pFeatureLevel, ppImmediateContext);
- };
+ CreateDeviceAndSwapChain =
+ [agsDev](IDXGIAdapter *pAdapter, D3D_DRIVER_TYPE DriverType, HMODULE Software, UINT Flags,
+ CONST D3D_FEATURE_LEVEL *pFeatureLevels, UINT FeatureLevels, UINT SDKVersion,
+ CONST DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, IDXGISwapChain **ppSwapChain,
+ ID3D11Device **ppDevice, D3D_FEATURE_LEVEL *pFeatureLevel,
+ ID3D11DeviceContext **ppImmediateContext) {
+ return agsDev->CreateD3D11(pAdapter, DriverType, Software, Flags, pFeatureLevels,
+ FeatureLevels, SDKVersion, pSwapChainDesc, ppSwapChain,
+ ppDevice, pFeatureLevel, ppImmediateContext);
+ };
}
else if(initParams.VendorExtensions != GPUVendor::Unknown)
{
diff --git a/renderdoc/driver/d3d11/d3d11_resources.h b/renderdoc/driver/d3d11/d3d11_resources.h
index abd1f0f75..9e1ed6053 100644
--- a/renderdoc/driver/d3d11/d3d11_resources.h
+++ b/renderdoc/driver/d3d11/d3d11_resources.h
@@ -946,8 +946,7 @@ public:
};
class WrappedID3D11UnorderedAccessView1
- : public WrappedView1
+ : public WrappedView1
{
public:
ALLOCATE_WITH_WRAPPED_POOL(WrappedID3D11UnorderedAccessView1);
diff --git a/renderdoc/driver/d3d11/d3d11_shader_cache.cpp b/renderdoc/driver/d3d11/d3d11_shader_cache.cpp
index b3f5d1d38..e9bfd97fe 100644
--- a/renderdoc/driver/d3d11/d3d11_shader_cache.cpp
+++ b/renderdoc/driver/d3d11/d3d11_shader_cache.cpp
@@ -132,10 +132,10 @@ rdcstr D3D11ShaderCache::GetShaderBlob(const char *source, const char *entry,
rdcstr cbuffers = GetEmbeddedResource(hlsl_cbuffers_h);
rdcstr texsample = GetEmbeddedResource(hlsl_texsample_h);
- EmbeddedD3DIncluder includer(includeDirs,
- {
- {"hlsl_texsample.h", texsample}, {"hlsl_cbuffers.h", cbuffers},
- });
+ EmbeddedD3DIncluder includer(includeDirs, {
+ {"hlsl_texsample.h", texsample},
+ {"hlsl_cbuffers.h", cbuffers},
+ });
uint32_t hash = strhash(source);
hash = strhash(entry, hash);
diff --git a/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp b/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp
index 0e2f984f9..afa354e34 100644
--- a/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp
+++ b/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp
@@ -2448,9 +2448,8 @@ void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position,
DebugHit *hit = winner;
rdcarray &ins = state.inputs;
- if(!ins.empty() &&
- ins.back().name ==
- dxbc->GetDXBCByteCode()->GetRegisterName(DXBCBytecode::TYPE_INPUT_COVERAGE_MASK, 0))
+ if(!ins.empty() && ins.back().name == dxbc->GetDXBCByteCode()->GetRegisterName(
+ DXBCBytecode::TYPE_INPUT_COVERAGE_MASK, 0))
ins.back().value.u32v[0] = hit->coverage;
state.semantics.coverage = hit->coverage;
diff --git a/renderdoc/driver/d3d11/d3d11_video.cpp b/renderdoc/driver/d3d11/d3d11_video.cpp
index 410268baf..450164260 100644
--- a/renderdoc/driver/d3d11/d3d11_video.cpp
+++ b/renderdoc/driver/d3d11/d3d11_video.cpp
@@ -1256,8 +1256,7 @@ HRESULT STDMETHODCALLTYPE WrappedID3D11VideoContext::VideoProcessorGetBehaviorHi
/* [annotation] */ _In_ ID3D11VideoProcessor *pVideoProcessor,
/* [annotation] */ _In_ UINT OutputWidth, /* [annotation] */ _In_ UINT OutputHeight,
/* [annotation] */ _In_ DXGI_FORMAT OutputFormat, /* [annotation] */ _In_ UINT StreamCount,
- /* [annotation] */ _In_reads_(StreamCount)
- const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *pStreams,
+ /* [annotation] */ _In_reads_(StreamCount) const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *pStreams,
/* [annotation] */ _Out_ UINT *pBehaviorHints)
{
if(!m_pReal1)
@@ -1319,8 +1318,7 @@ HRESULT STDMETHODCALLTYPE WrappedID3D11VideoContext::DecoderBeginFrame1(
/* [annotation] */ _In_ ID3D11VideoDecoder *pDecoder,
/* [annotation] */ _In_ ID3D11VideoDecoderOutputView *pView, UINT ContentKeySize,
/* [annotation] */ _In_reads_bytes_opt_(ContentKeySize) const void *pContentKey,
- /* [annotation] */ _In_range_(0, D3D11_4_VIDEO_DECODER_MAX_HISTOGRAM_COMPONENTS)
- UINT NumComponentHistograms,
+ /* [annotation] */ _In_range_(0, D3D11_4_VIDEO_DECODER_MAX_HISTOGRAM_COMPONENTS) UINT NumComponentHistograms,
/* [annotation] */ _In_reads_opt_(NumComponentHistograms) const UINT *pHistogramOffsets,
/* [annotation] */ _In_reads_opt_(NumComponentHistograms) ID3D11Buffer *const *ppHistogramBuffers)
{
diff --git a/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp
index e42a277fd..127547e1b 100644
--- a/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp
+++ b/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp
@@ -127,8 +127,8 @@ static rdcstr MakeRenderPassOpString(bool ending, UINT NumRenderTargets,
if(pDepthStencil->StencilEndingAccess.Type == pDepthStencil->DepthEndingAccess.Type)
opDesc += "DS=" + ToHumanStr(pDepthStencil->DepthEndingAccess.Type);
else
- opDesc += "D=" + ToHumanStr(pDepthStencil->DepthEndingAccess.Type) + ", S=" +
- ToHumanStr(pDepthStencil->StencilEndingAccess.Type);
+ opDesc += "D=" + ToHumanStr(pDepthStencil->DepthEndingAccess.Type) +
+ ", S=" + ToHumanStr(pDepthStencil->StencilEndingAccess.Type);
}
else
{
@@ -136,8 +136,8 @@ static rdcstr MakeRenderPassOpString(bool ending, UINT NumRenderTargets,
if(pDepthStencil->StencilBeginningAccess.Type == pDepthStencil->DepthBeginningAccess.Type)
opDesc += "DS=" + ToHumanStr(pDepthStencil->DepthBeginningAccess.Type);
else
- opDesc += "D=" + ToHumanStr(pDepthStencil->DepthBeginningAccess.Type) + ", S=" +
- ToHumanStr(pDepthStencil->StencilBeginningAccess.Type);
+ opDesc += "D=" + ToHumanStr(pDepthStencil->DepthBeginningAccess.Type) +
+ ", S=" + ToHumanStr(pDepthStencil->StencilBeginningAccess.Type);
}
}
}
diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp
index 609c67c14..68913f341 100644
--- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp
+++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp
@@ -4659,9 +4659,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearDepthStencilView(
m_Cmd->HandlePreCallback(list, ActionFlags::Clear | ActionFlags::ClearDepthStencil);
Unwrap(list)->ClearDepthStencilView(Unwrap(DepthStencilView), ClearFlags, Depth, Stencil,
NumRects, pRects);
- if(eventId &&
- m_Cmd->m_ActionCallback->PostMisc(
- eventId, ActionFlags::Clear | ActionFlags::ClearDepthStencil, list))
+ if(eventId && m_Cmd->m_ActionCallback->PostMisc(
+ eventId, ActionFlags::Clear | ActionFlags::ClearDepthStencil, list))
{
Unwrap(list)->ClearDepthStencilView(Unwrap(DepthStencilView), ClearFlags, Depth, Stencil,
NumRects, pRects);
@@ -4766,9 +4765,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearRenderTargetView(
uint32_t eventId =
m_Cmd->HandlePreCallback(list, ActionFlags::Clear | ActionFlags::ClearColor);
Unwrap(list)->ClearRenderTargetView(Unwrap(RenderTargetView), ColorRGBA, NumRects, pRects);
- if(eventId &&
- m_Cmd->m_ActionCallback->PostMisc(eventId, ActionFlags::Clear | ActionFlags::ClearColor,
- list))
+ if(eventId && m_Cmd->m_ActionCallback->PostMisc(
+ eventId, ActionFlags::Clear | ActionFlags::ClearColor, list))
{
Unwrap(list)->ClearRenderTargetView(Unwrap(RenderTargetView), ColorRGBA, NumRects, pRects);
m_Cmd->m_ActionCallback->PostRemisc(eventId, ActionFlags::Clear | ActionFlags::ClearColor,
diff --git a/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp
index 17b71b45b..167e6c90d 100644
--- a/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp
+++ b/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp
@@ -181,8 +181,9 @@ void STDMETHODCALLTYPE WrappedID3D12CommandQueue::UpdateTileMappings(
else
{
pageTable.setImageBoxRange(
- regionStart.Subresource, {regionStart.X * texelShape.x, regionStart.Y * texelShape.y,
- regionStart.Z * texelShape.z},
+ regionStart.Subresource,
+ {regionStart.X * texelShape.x, regionStart.Y * texelShape.y,
+ regionStart.Z * texelShape.z},
{regionSize.Width * texelShape.x, regionSize.Height * texelShape.y,
regionSize.Depth * texelShape.z},
memId, memoryOffsetInTiles * pageSize, singlePage);
diff --git a/renderdoc/driver/d3d12/d3d12_commands.cpp b/renderdoc/driver/d3d12/d3d12_commands.cpp
index 926731452..d753d34aa 100644
--- a/renderdoc/driver/d3d12/d3d12_commands.cpp
+++ b/renderdoc/driver/d3d12/d3d12_commands.cpp
@@ -921,9 +921,7 @@ bool WrappedID3D12CommandQueue::ProcessChunk(ReadSerialiser &ser, D3D12Chunk chu
case D3D12Chunk::Swapchain_Present: ret = m_pDevice->Serialise_Present(ser, NULL, 0, 0); break;
- case D3D12Chunk::List_ClearState:
- ret = m_ReplayList->Serialise_ClearState(ser, NULL);
- break;
+ case D3D12Chunk::List_ClearState: ret = m_ReplayList->Serialise_ClearState(ser, NULL); break;
// in order to get a warning if we miss a case, we explicitly handle the device creation chunks
// here. If we actually encounter one it's an error (we shouldn't see these inside the captured
diff --git a/renderdoc/driver/d3d12/d3d12_debug.cpp b/renderdoc/driver/d3d12/d3d12_debug.cpp
index 678c5878e..a4fd6b0d1 100644
--- a/renderdoc/driver/d3d12/d3d12_debug.cpp
+++ b/renderdoc/driver/d3d12/d3d12_debug.cpp
@@ -1939,7 +1939,8 @@ void D3D12Replay::TextureRendering::Init(WrappedID3D12Device *device, D3D12Debug
ID3DBlob *TexRemap[3] = {};
DXGI_FORMAT formats[3] = {
- DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R16G16B16A16_TYPELESS,
+ DXGI_FORMAT_R8G8B8A8_TYPELESS,
+ DXGI_FORMAT_R16G16B16A16_TYPELESS,
DXGI_FORMAT_R32G32B32A32_TYPELESS,
};
diff --git a/renderdoc/driver/d3d12/d3d12_device.h b/renderdoc/driver/d3d12/d3d12_device.h
index 073649081..16150ce69 100644
--- a/renderdoc/driver/d3d12/d3d12_device.h
+++ b/renderdoc/driver/d3d12/d3d12_device.h
@@ -444,14 +444,16 @@ public:
};
// these aren't documented, they're defined in D3D12TranslationLayer in the d3d11on12 codebase
-typedef enum D3D12_COMPATIBILITY_SHARED_FLAGS {
+typedef enum D3D12_COMPATIBILITY_SHARED_FLAGS
+{
D3D12_COMPATIBILITY_SHARED_FLAG_NONE = 0,
D3D12_COMPATIBILITY_SHARED_FLAG_NON_NT_HANDLE = 0x1,
D3D12_COMPATIBILITY_SHARED_FLAG_KEYED_MUTEX = 0x2,
D3D12_COMPATIBILITY_SHARED_FLAG_9_ON_12 = 0x4
} D3D12_COMPATIBILITY_SHARED_FLAGS;
-typedef enum D3D12_REFLECT_SHARED_PROPERTY {
+typedef enum D3D12_REFLECT_SHARED_PROPERTY
+{
D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS = 0,
D3D12_REFELCT_SHARED_PROPERTY_COMPATIBILITY_SHARED_FLAGS =
(D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS + 1),
diff --git a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp
index 002609d3f..dea8bf3b1 100644
--- a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp
+++ b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp
@@ -901,9 +901,7 @@ bool WrappedID3D12Device::Serialise_CreateDescriptorHeap(
SerialiserType &ser, const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, REFIID riid,
void **ppvHeap)
{
- SERIALISE_ELEMENT_LOCAL(Descriptor, *pDescriptorHeapDesc)
- .Named("pDescriptorHeapDesc"_lit)
- .Important();
+ SERIALISE_ELEMENT_LOCAL(Descriptor, *pDescriptorHeapDesc).Named("pDescriptorHeapDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pHeap, ((WrappedID3D12DescriptorHeap *)*ppvHeap)->GetResourceID())
.TypedAs("ID3D12DescriptorHeap *"_lit);
diff --git a/renderdoc/driver/d3d12/d3d12_manager.h b/renderdoc/driver/d3d12/d3d12_manager.h
index 8853c2ab2..3e059f04c 100644
--- a/renderdoc/driver/d3d12/d3d12_manager.h
+++ b/renderdoc/driver/d3d12/d3d12_manager.h
@@ -359,14 +359,14 @@ public:
operator D3D12_CPU_DESCRIPTOR_HANDLE() const
{
D3D12_CPU_DESCRIPTOR_HANDLE handle;
- handle.ptr = (SIZE_T) this;
+ handle.ptr = (SIZE_T)this;
return handle;
}
operator D3D12_GPU_DESCRIPTOR_HANDLE() const
{
D3D12_GPU_DESCRIPTOR_HANDLE handle;
- handle.ptr = (SIZE_T) this;
+ handle.ptr = (SIZE_T)this;
return handle;
}
diff --git a/renderdoc/driver/d3d12/d3d12_overlay.cpp b/renderdoc/driver/d3d12/d3d12_overlay.cpp
index 704712125..fd6bcccb8 100644
--- a/renderdoc/driver/d3d12/d3d12_overlay.cpp
+++ b/renderdoc/driver/d3d12/d3d12_overlay.cpp
@@ -1802,7 +1802,9 @@ ResourceId D3D12Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
rs.graphics.rootsig = GetResID(GetDebugManager()->GetMeshRootSig());
rs.graphics.sigelems = {
- vertexElem, viewportElem, viewportConstElem,
+ vertexElem,
+ viewportElem,
+ viewportConstElem,
};
rs.rts = {*(D3D12Descriptor *)rtv.ptr};
diff --git a/renderdoc/driver/d3d12/d3d12_rendermesh.cpp b/renderdoc/driver/d3d12/d3d12_rendermesh.cpp
index 5c2f77cf6..ae7683445 100644
--- a/renderdoc/driver/d3d12/d3d12_rendermesh.cpp
+++ b/renderdoc/driver/d3d12/d3d12_rendermesh.cpp
@@ -835,7 +835,10 @@ void D3D12Replay::RenderMesh(uint32_t eventId, const rdcarray &secon
cache = GetDebugManager()->CacheMeshDisplayPipelines(helper, helper);
FloatVector vertSprite[4] = {
- activeVertex, activeVertex, activeVertex, activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
};
list->IASetPrimitiveTopology(MakeD3DPrimitiveTopology(helper.topology));
diff --git a/renderdoc/driver/d3d12/d3d12_rendertext.cpp b/renderdoc/driver/d3d12/d3d12_rendertext.cpp
index a78706be7..cecab8573 100644
--- a/renderdoc/driver/d3d12/d3d12_rendertext.cpp
+++ b/renderdoc/driver/d3d12/d3d12_rendertext.cpp
@@ -328,18 +328,38 @@ D3D12TextRenderer::D3D12TextRenderer(WrappedID3D12Device *wrapper)
const D3D12_STATIC_SAMPLER_DESC1 samplers[2] = {
// point
{
- D3D12_FILTER_MIN_MAG_MIP_POINT, D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
- D3D12_TEXTURE_ADDRESS_MODE_CLAMP, D3D12_TEXTURE_ADDRESS_MODE_CLAMP, 0.0f, 1,
- D3D12_COMPARISON_FUNC_ALWAYS, D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK, 0.0f, FLT_MAX, 0, 0,
- D3D12_SHADER_VISIBILITY_PIXEL, D3D12_SAMPLER_FLAG_NONE,
+ D3D12_FILTER_MIN_MAG_MIP_POINT,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ 0.0f,
+ 1,
+ D3D12_COMPARISON_FUNC_ALWAYS,
+ D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK,
+ 0.0f,
+ FLT_MAX,
+ 0,
+ 0,
+ D3D12_SHADER_VISIBILITY_PIXEL,
+ D3D12_SAMPLER_FLAG_NONE,
},
// linear
{
- D3D12_FILTER_MIN_MAG_MIP_LINEAR, D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
- D3D12_TEXTURE_ADDRESS_MODE_CLAMP, D3D12_TEXTURE_ADDRESS_MODE_CLAMP, 0.0f, 1,
- D3D12_COMPARISON_FUNC_ALWAYS, D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK, 0.0f, FLT_MAX, 1, 0,
- D3D12_SHADER_VISIBILITY_PIXEL, D3D12_SAMPLER_FLAG_NONE,
+ D3D12_FILTER_MIN_MAG_MIP_LINEAR,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ 0.0f,
+ 1,
+ D3D12_COMPARISON_FUNC_ALWAYS,
+ D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK,
+ 0.0f,
+ FLT_MAX,
+ 1,
+ 0,
+ D3D12_SHADER_VISIBILITY_PIXEL,
+ D3D12_SAMPLER_FLAG_NONE,
},
};
diff --git a/renderdoc/driver/d3d12/d3d12_resources.h b/renderdoc/driver/d3d12/d3d12_resources.h
index 9ff1fbf9d..89a5fe0c1 100644
--- a/renderdoc/driver/d3d12/d3d12_resources.h
+++ b/renderdoc/driver/d3d12/d3d12_resources.h
@@ -1259,35 +1259,62 @@ struct UnwrapHelper
};
#undef D3D12_TYPE_MACRO
-#define D3D12_TYPE_MACRO(iface) \
- template <> \
- struct UnwrapHelper \
- { \
- typedef CONCAT(Wrapped, iface) Outer; \
- static bool IsAlloc(void *ptr) { return Outer::IsAlloc(ptr); } \
- static D3D12ResourceType GetTypeEnum() { return (D3D12ResourceType)Outer::TypeEnum; } \
- static Outer *FromHandle(iface *wrapped) { return (Outer *)wrapped; } \
- }; \
- template <> \
- struct UnwrapHelper \
- { \
- typedef CONCAT(Wrapped, iface) Outer; \
- static bool IsAlloc(void *ptr) { return Outer::IsAlloc(ptr); } \
- static D3D12ResourceType GetTypeEnum() { return (D3D12ResourceType)Outer::TypeEnum; } \
- static Outer *FromHandle(iface *wrapped) { return (Outer *)wrapped; } \
+#define D3D12_TYPE_MACRO(iface) \
+ template <> \
+ struct UnwrapHelper \
+ { \
+ typedef CONCAT(Wrapped, iface) Outer; \
+ static bool IsAlloc(void *ptr) \
+ { \
+ return Outer::IsAlloc(ptr); \
+ } \
+ static D3D12ResourceType GetTypeEnum() \
+ { \
+ return (D3D12ResourceType)Outer::TypeEnum; \
+ } \
+ static Outer *FromHandle(iface *wrapped) \
+ { \
+ return (Outer *)wrapped; \
+ } \
+ }; \
+ template <> \
+ struct UnwrapHelper \
+ { \
+ typedef CONCAT(Wrapped, iface) Outer; \
+ static bool IsAlloc(void *ptr) \
+ { \
+ return Outer::IsAlloc(ptr); \
+ } \
+ static D3D12ResourceType GetTypeEnum() \
+ { \
+ return (D3D12ResourceType)Outer::TypeEnum; \
+ } \
+ static Outer *FromHandle(iface *wrapped) \
+ { \
+ return (Outer *)wrapped; \
+ } \
};
ALL_D3D12_TYPES;
// extra helpers here for '1' or '2' extended interfaces
-#define D3D12_UNWRAP_EXTENDED(iface, ifaceX) \
- template <> \
- struct UnwrapHelper \
- { \
- typedef CONCAT(Wrapped, iface) Outer; \
- static bool IsAlloc(void *ptr) { return Outer::IsAlloc(ptr); } \
- static D3D12ResourceType GetTypeEnum() { return (D3D12ResourceType)Outer::TypeEnum; } \
- static Outer *FromHandle(ifaceX *wrapped) { return (Outer *)wrapped; } \
+#define D3D12_UNWRAP_EXTENDED(iface, ifaceX) \
+ template <> \
+ struct UnwrapHelper \
+ { \
+ typedef CONCAT(Wrapped, iface) Outer; \
+ static bool IsAlloc(void *ptr) \
+ { \
+ return Outer::IsAlloc(ptr); \
+ } \
+ static D3D12ResourceType GetTypeEnum() \
+ { \
+ return (D3D12ResourceType)Outer::TypeEnum; \
+ } \
+ static Outer *FromHandle(ifaceX *wrapped) \
+ { \
+ return (Outer *)wrapped; \
+ } \
};
D3D12_UNWRAP_EXTENDED(ID3D12Fence, ID3D12Fence1);
diff --git a/renderdoc/driver/d3d12/d3d12_shader_cache.cpp b/renderdoc/driver/d3d12/d3d12_shader_cache.cpp
index 40d05815d..e99b40b4a 100644
--- a/renderdoc/driver/d3d12/d3d12_shader_cache.cpp
+++ b/renderdoc/driver/d3d12/d3d12_shader_cache.cpp
@@ -340,10 +340,10 @@ rdcstr D3D12ShaderCache::GetShaderBlob(const char *source, const char *entry,
rdcstr cbuffers = GetEmbeddedResource(hlsl_cbuffers_h);
rdcstr texsample = GetEmbeddedResource(hlsl_texsample_h);
- EmbeddedD3DIncluder includer(includeDirs,
- {
- {"hlsl_texsample.h", texsample}, {"hlsl_cbuffers.h", cbuffers},
- });
+ EmbeddedD3DIncluder includer(includeDirs, {
+ {"hlsl_texsample.h", texsample},
+ {"hlsl_cbuffers.h", cbuffers},
+ });
uint32_t hash = strhash(source);
hash = strhash(entry, hash);
@@ -877,8 +877,10 @@ ID3DBlob *D3D12ShaderCache::MakeFixedColShader(FixedColVariant variant, bool dxi
if(!ret)
{
const rdcstr embedded[] = {
- GetEmbeddedResource(fixedcol_0_dxbc), GetEmbeddedResource(fixedcol_1_dxbc),
- GetEmbeddedResource(fixedcol_2_dxbc), GetEmbeddedResource(fixedcol_3_dxbc),
+ GetEmbeddedResource(fixedcol_0_dxbc),
+ GetEmbeddedResource(fixedcol_1_dxbc),
+ GetEmbeddedResource(fixedcol_2_dxbc),
+ GetEmbeddedResource(fixedcol_3_dxbc),
};
D3D12ShaderCacheCallbacks.Create((uint32_t)embedded[variant].size(), embedded[variant].data(),
diff --git a/renderdoc/driver/d3d12/d3d12_shader_feedback.cpp b/renderdoc/driver/d3d12/d3d12_shader_feedback.cpp
index 9bd8c38d4..c4dcb896e 100644
--- a/renderdoc/driver/d3d12/d3d12_shader_feedback.cpp
+++ b/renderdoc/driver/d3d12/d3d12_shader_feedback.cpp
@@ -843,7 +843,8 @@ static bool AnnotateDXILShader(const DXBC::DXBCContainer *dxbc, uint32_t space,
f->instructions.insert(i++, byteOffset);
byteOffset->type = i32;
byteOffset->args = {
- slotPlusBaseClamped, editor.CreateConstant(2U),
+ slotPlusBaseClamped,
+ editor.CreateConstant(2U),
};
Instruction *atomicOr = editor.CreateInstruction(atomicBinOp);
@@ -977,7 +978,8 @@ static bool AnnotateDXILShader(const DXBC::DXBCContainer *dxbc, uint32_t space,
f->instructions.insert(i++, byteOffset);
byteOffset->type = i32;
byteOffset->args = {
- slotPlusBase, editor.CreateConstant(2U),
+ slotPlusBase,
+ editor.CreateConstant(2U),
};
uint32_t feedbackValue = magicFeedbackValue | (1 << (uint32_t)handleKind);
diff --git a/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp b/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp
index dafe65539..f7c18dafa 100644
--- a/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp
+++ b/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp
@@ -2409,8 +2409,9 @@ void ExtractInputsPS(PSInput IN,
if(depthFunc == D3D12_COMPARISON_FUNC_EQUAL && depthTarget != ResourceId())
{
float depthStencilValue[4] = {};
- PickPixel(depthTarget, x, y, Subresource(rs.dsv.GetDSV().Texture2DArray.MipSlice,
- rs.dsv.GetDSV().Texture2DArray.FirstArraySlice, sample),
+ PickPixel(depthTarget, x, y,
+ Subresource(rs.dsv.GetDSV().Texture2DArray.MipSlice,
+ rs.dsv.GetDSV().Texture2DArray.FirstArraySlice, sample),
CompType::Depth, depthStencilValue);
existingDepth = depthStencilValue[0];
diff --git a/renderdoc/driver/dxgi/dxgi_common.cpp b/renderdoc/driver/dxgi/dxgi_common.cpp
index 515550e09..e28694924 100644
--- a/renderdoc/driver/dxgi/dxgi_common.cpp
+++ b/renderdoc/driver/dxgi/dxgi_common.cpp
@@ -1056,8 +1056,7 @@ DXGI_FORMAT GetTypedFormat(DXGI_FORMAT f)
case DXGI_FORMAT_R16G16_TYPELESS: return DXGI_FORMAT_R16G16_FLOAT;
- case DXGI_FORMAT_R32_TYPELESS:
- return DXGI_FORMAT_R32_FLOAT;
+ case DXGI_FORMAT_R32_TYPELESS: return DXGI_FORMAT_R32_FLOAT;
// maybe not valid casts?
case DXGI_FORMAT_R24G8_TYPELESS: return DXGI_FORMAT_R24_UNORM_X8_TYPELESS;
@@ -1096,7 +1095,7 @@ DXGI_FORMAT GetTypedFormat(DXGI_FORMAT f, CompType typeCast)
{
switch(f)
{
- // these formats have multiple typed formats - use the hint to decide which to use
+ // these formats have multiple typed formats - use the hint to decide which to use
case DXGI_FORMAT_R8_TYPELESS:
{
@@ -1329,8 +1328,7 @@ DXGI_FORMAT GetTypelessFormat(DXGI_FORMAT f)
case DXGI_FORMAT_D32_FLOAT: // maybe not valid cast?
case DXGI_FORMAT_R32_FLOAT:
case DXGI_FORMAT_R32_UINT:
- case DXGI_FORMAT_R32_SINT:
- return DXGI_FORMAT_R32_TYPELESS;
+ case DXGI_FORMAT_R32_SINT: return DXGI_FORMAT_R32_TYPELESS;
// maybe not valid casts?
case DXGI_FORMAT_R24G8_TYPELESS:
@@ -3241,8 +3239,16 @@ TEST_CASE("DXGI formats", "[format][d3d]")
int i = 0;
for(DXGI_FORMAT f : {
- DXGI_FORMAT_AYUV, DXGI_FORMAT_Y410, DXGI_FORMAT_Y416, DXGI_FORMAT_NV12, DXGI_FORMAT_P010,
- DXGI_FORMAT_P016, DXGI_FORMAT_YUY2, DXGI_FORMAT_Y210, DXGI_FORMAT_Y216, DXGI_FORMAT_P208,
+ DXGI_FORMAT_AYUV,
+ DXGI_FORMAT_Y410,
+ DXGI_FORMAT_Y416,
+ DXGI_FORMAT_NV12,
+ DXGI_FORMAT_P010,
+ DXGI_FORMAT_P016,
+ DXGI_FORMAT_YUY2,
+ DXGI_FORMAT_Y210,
+ DXGI_FORMAT_Y216,
+ DXGI_FORMAT_P208,
})
{
if(isUnsupportedFormat(f))
diff --git a/renderdoc/driver/dxgi/dxgi_wrapped.h b/renderdoc/driver/dxgi/dxgi_wrapped.h
index 1dc0adef5..162945ce4 100644
--- a/renderdoc/driver/dxgi/dxgi_wrapped.h
+++ b/renderdoc/driver/dxgi/dxgi_wrapped.h
@@ -127,8 +127,14 @@ public:
};
#define IMPLEMENT_IDXGIOBJECT_WITH_REFCOUNTDXGIOBJECT_CUSTOMQUERY \
- ULONG STDMETHODCALLTYPE AddRef() { return RefCountDXGIObject::AddRef(); } \
- ULONG STDMETHODCALLTYPE Release() { return RefCountDXGIObject::Release(); } \
+ ULONG STDMETHODCALLTYPE AddRef() \
+ { \
+ return RefCountDXGIObject::AddRef(); \
+ } \
+ ULONG STDMETHODCALLTYPE Release() \
+ { \
+ return RefCountDXGIObject::Release(); \
+ } \
HRESULT STDMETHODCALLTYPE SetPrivateData(REFIID Name, UINT DataSize, const void *pData) \
{ \
return RefCountDXGIObject::SetPrivateData(Name, DataSize, pData); \
diff --git a/renderdoc/driver/gl/cgl_platform_helpers.mm b/renderdoc/driver/gl/cgl_platform_helpers.mm
index 1f1384dfc..32b73b436 100644
--- a/renderdoc/driver/gl/cgl_platform_helpers.mm
+++ b/renderdoc/driver/gl/cgl_platform_helpers.mm
@@ -77,14 +77,14 @@ static void IncrementContextLockCount(int contextIndex)
{
#if RD_USE_CONTEXT_LOCK_COUNTS
Atomic::Inc32(s_ContextLocksCount.data() + contextIndex);
-#endif //#if RD_USE_CONTEXT_LOCK_COUNTS
+#endif // #if RD_USE_CONTEXT_LOCK_COUNTS
}
static void DecrementContextLockCount(int contextIndex)
{
#if RD_USE_CONTEXT_LOCK_COUNTS
Atomic::Dec32(s_ContextLocksCount.data() + contextIndex);
-#endif //#if RD_USE_CONTEXT_LOCK_COUNTS
+#endif // #if RD_USE_CONTEXT_LOCK_COUNTS
}
static void LockContext(int contextIndex)
@@ -520,7 +520,7 @@ void NSGL_destroyContext(void *context)
s_ContextPtrs[contextIndex] = nil;
#if RD_USE_CONTEXT_LOCK_COUNTS
RDCASSERT(0 == s_ContextLocksCount[contextIndex]);
-#endif //#if RD_USE_CONTEXT_LOCK_COUNTS
+#endif // #if RD_USE_CONTEXT_LOCK_COUNTS
}
}
}
diff --git a/renderdoc/driver/gl/egl_hooks.cpp b/renderdoc/driver/gl/egl_hooks.cpp
index 8548b9730..a72f2055e 100644
--- a/renderdoc/driver/gl/egl_hooks.cpp
+++ b/renderdoc/driver/gl/egl_hooks.cpp
@@ -1107,10 +1107,11 @@ void EGLHook::RegisterHooks()
#endif
// register EGL hooks
-#define EGL_REGISTER(func, isext, replayrequired) \
- LibraryHooks::RegisterFunctionHook( \
- "libEGL" LIBSUFFIX, FunctionHook("egl" STRINGIZE(func), (void **)&EGL.func, \
- (void *)&CONCAT(egl, CONCAT(func, _renderdoc_hooked))));
+#define EGL_REGISTER(func, isext, replayrequired) \
+ LibraryHooks::RegisterFunctionHook( \
+ "libEGL" LIBSUFFIX, \
+ FunctionHook("egl" STRINGIZE(func), (void **)&EGL.func, \
+ (void *)&CONCAT(egl, CONCAT(func, _renderdoc_hooked))));
EGL_HOOKED_SYMBOLS(EGL_REGISTER)
#undef EGL_REGISTER
}
diff --git a/renderdoc/driver/gl/egl_platform.cpp b/renderdoc/driver/gl/egl_platform.cpp
index 984195e72..ba89555f1 100644
--- a/renderdoc/driver/gl/egl_platform.cpp
+++ b/renderdoc/driver/gl/egl_platform.cpp
@@ -433,7 +433,9 @@ class EGLPlatform : public GLPlatform
#define LIBSUFFIX ".so"
#endif
const char *libs[] = {
- "libGLESv3" LIBSUFFIX, "libGLESv2" LIBSUFFIX ".2", "libGLESv2" LIBSUFFIX,
+ "libGLESv3" LIBSUFFIX,
+ "libGLESv2" LIBSUFFIX ".2",
+ "libGLESv2" LIBSUFFIX,
"libGLESv1_CM" LIBSUFFIX,
};
@@ -479,7 +481,7 @@ bool EGLDispatchTable::PopulateForReplay()
if(!this->func) \
this->func = (CONCAT(PFN_egl, func))Process::GetFunctionAddress(handle, "egl" STRINGIZE(func)); \
if(!this->func && CheckConstParam(isext)) \
- this->func = (CONCAT(PFN_egl, func)) this->GetProcAddress("egl" STRINGIZE(func)); \
+ this->func = (CONCAT(PFN_egl, func))this->GetProcAddress("egl" STRINGIZE(func)); \
\
if(!this->func && !CheckConstParam(isext)) \
{ \
diff --git a/renderdoc/driver/gl/gl_common.cpp b/renderdoc/driver/gl/gl_common.cpp
index a6c96398a..19344a07f 100644
--- a/renderdoc/driver/gl/gl_common.cpp
+++ b/renderdoc/driver/gl/gl_common.cpp
@@ -1921,36 +1921,24 @@ ResourceFormat MakeResourceFormat(GLenum target, GLenum fmt)
case eGL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case eGL_COMPRESSED_SRGB_S3TC_DXT1_EXT: ret.compCount = 3; break;
case eGL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
- ret.compCount = 4;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: ret.compCount = 4; break;
// BC2
case eGL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- ret.compCount = 4;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: ret.compCount = 4; break;
// BC3
case eGL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- ret.compCount = 4;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: ret.compCount = 4; break;
// BC4
case eGL_COMPRESSED_RED_RGTC1:
- case eGL_COMPRESSED_SIGNED_RED_RGTC1:
- ret.compCount = 1;
- break;
+ case eGL_COMPRESSED_SIGNED_RED_RGTC1: ret.compCount = 1; break;
// BC5
case eGL_COMPRESSED_RG_RGTC2:
- case eGL_COMPRESSED_SIGNED_RG_RGTC2:
- ret.compCount = 2;
- break;
+ case eGL_COMPRESSED_SIGNED_RG_RGTC2: ret.compCount = 2; break;
// BC6
case eGL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
- case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
- ret.compCount = 3;
- break;
+ case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB: ret.compCount = 3; break;
// BC7
case eGL_COMPRESSED_RGBA_BPTC_UNORM_ARB:
case eGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB: ret.compCount = 4; break;
@@ -2058,39 +2046,25 @@ ResourceFormat MakeResourceFormat(GLenum target, GLenum fmt)
case eGL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case eGL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case eGL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
- ret.type = ResourceFormatType::BC1;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: ret.type = ResourceFormatType::BC1; break;
// BC2
case eGL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- ret.type = ResourceFormatType::BC2;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: ret.type = ResourceFormatType::BC2; break;
// BC3
case eGL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- ret.type = ResourceFormatType::BC3;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: ret.type = ResourceFormatType::BC3; break;
// BC4
case eGL_COMPRESSED_RED_RGTC1:
- case eGL_COMPRESSED_SIGNED_RED_RGTC1:
- ret.type = ResourceFormatType::BC4;
- break;
+ case eGL_COMPRESSED_SIGNED_RED_RGTC1: ret.type = ResourceFormatType::BC4; break;
// BC5
case eGL_COMPRESSED_RG_RGTC2:
- case eGL_COMPRESSED_SIGNED_RG_RGTC2:
- ret.type = ResourceFormatType::BC5;
- break;
+ case eGL_COMPRESSED_SIGNED_RG_RGTC2: ret.type = ResourceFormatType::BC5; break;
// BC6
case eGL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
- case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
- ret.type = ResourceFormatType::BC6;
- break;
+ case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB: ret.type = ResourceFormatType::BC6; break;
// BC7
case eGL_COMPRESSED_RGBA_BPTC_UNORM_ARB:
- case eGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB:
- ret.type = ResourceFormatType::BC7;
- break;
+ case eGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB: ret.type = ResourceFormatType::BC7; break;
// ETC1
case eGL_ETC1_RGB8_OES: // handle it as ETC2
// ETC2
@@ -2106,9 +2080,7 @@ ResourceFormat MakeResourceFormat(GLenum target, GLenum fmt)
case eGL_COMPRESSED_R11_EAC:
case eGL_COMPRESSED_SIGNED_R11_EAC:
case eGL_COMPRESSED_RG11_EAC:
- case eGL_COMPRESSED_SIGNED_RG11_EAC:
- ret.type = ResourceFormatType::EAC;
- break;
+ case eGL_COMPRESSED_SIGNED_RG11_EAC: ret.type = ResourceFormatType::EAC; break;
// ASTC
case eGL_COMPRESSED_RGBA_ASTC_4x4_KHR:
case eGL_COMPRESSED_RGBA_ASTC_5x4_KHR:
@@ -2157,9 +2129,7 @@ ResourceFormat MakeResourceFormat(GLenum target, GLenum fmt)
case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES:
case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES:
case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES:
- case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES:
- ret.type = ResourceFormatType::ASTC;
- break;
+ case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES: ret.type = ResourceFormatType::ASTC; break;
// PVRTC
case eGL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT:
case eGL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT:
diff --git a/renderdoc/driver/gl/gl_common.h b/renderdoc/driver/gl/gl_common.h
index 04e1d92d9..c500d669b 100644
--- a/renderdoc/driver/gl/gl_common.h
+++ b/renderdoc/driver/gl/gl_common.h
@@ -210,13 +210,14 @@ struct GLWindowingData
CGLPixelFormatObj pix;
};
-#define DECL_HOOK_EXPORT(function) \
- __attribute__((used)) static struct \
- { \
- const void *replacment; \
- const void *replacee; \
- } _interpose_def_##function __attribute__((section("__DATA,__interpose"))) = { \
- (const void *)(unsigned long)&GL_EXPORT_NAME(function), (const void *)(unsigned long)&function, \
+#define DECL_HOOK_EXPORT(function) \
+ __attribute__((used)) static struct \
+ { \
+ const void *replacment; \
+ const void *replacee; \
+ } _interpose_def_##function __attribute__((section("__DATA,__interpose"))) = { \
+ (const void *)(unsigned long)&GL_EXPORT_NAME(function), \
+ (const void *)(unsigned long)&function, \
};
#elif ENABLED(RDOC_ANDROID)
diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp
index ae01c97fc..84cb05261 100644
--- a/renderdoc/driver/gl/gl_debug.cpp
+++ b/renderdoc/driver/gl/gl_debug.cpp
@@ -985,15 +985,40 @@ void GLReplay::InitDebugData()
Vec3f axisFrustum[] = {
// axis marker vertices
- Vec3f(0.0f, 0.0f, 0.0f), Vec3f(1.0f, 0.0f, 0.0f), Vec3f(0.0f, 0.0f, 0.0f),
- Vec3f(0.0f, 1.0f, 0.0f), Vec3f(0.0f, 0.0f, 0.0f), Vec3f(0.0f, 0.0f, 1.0f),
+ Vec3f(0.0f, 0.0f, 0.0f),
+ Vec3f(1.0f, 0.0f, 0.0f),
+ Vec3f(0.0f, 0.0f, 0.0f),
+ Vec3f(0.0f, 1.0f, 0.0f),
+ Vec3f(0.0f, 0.0f, 0.0f),
+ Vec3f(0.0f, 0.0f, 1.0f),
// frustum vertices
- TLN, TRN, TRN, BRN, BRN, BLN, BLN, TLN,
+ TLN,
+ TRN,
+ TRN,
+ BRN,
+ BRN,
+ BLN,
+ BLN,
+ TLN,
- TLN, TLF, TRN, TRF, BLN, BLF, BRN, BRF,
+ TLN,
+ TLF,
+ TRN,
+ TRF,
+ BLN,
+ BLF,
+ BRN,
+ BRF,
- TLF, TRF, TRF, BRF, BRF, BLF, BLF, TLF,
+ TLF,
+ TRF,
+ TRF,
+ BRF,
+ BRF,
+ BLF,
+ BLF,
+ TLF,
};
drv.glNamedBufferDataEXT(DebugData.axisFrustumBuffer, sizeof(axisFrustum), axisFrustum,
@@ -1652,7 +1677,10 @@ void GLReplay::PickPixel(ResourceId texture, uint32_t x, uint32_t y, const Subre
if(IsSIntFormat(texDetails.internalFormat))
{
int32_t casted[4] = {
- (int32_t)pixel[0], (int32_t)pixel[1], (int32_t)pixel[2], (int32_t)pixel[3],
+ (int32_t)pixel[0],
+ (int32_t)pixel[1],
+ (int32_t)pixel[2],
+ (int32_t)pixel[3],
};
memcpy(pixel, casted, sizeof(casted));
@@ -1660,7 +1688,10 @@ void GLReplay::PickPixel(ResourceId texture, uint32_t x, uint32_t y, const Subre
else if(IsUIntFormat(texDetails.internalFormat))
{
uint32_t casted[4] = {
- (uint32_t)pixel[0], (uint32_t)pixel[1], (uint32_t)pixel[2], (uint32_t)pixel[3],
+ (uint32_t)pixel[0],
+ (uint32_t)pixel[1],
+ (uint32_t)pixel[2],
+ (uint32_t)pixel[3],
};
memcpy(pixel, casted, sizeof(casted));
@@ -1709,7 +1740,8 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
// for depth/stencil we need to run the code twice - once to fetch depth and once to fetch
// stencil - since we can't process float depth and int stencil at the same time
Vec4f depth[2] = {
- {0.0f, 0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f, 1.0f},
+ {0.0f, 0.0f, 0.0f, 0.0f},
+ {1.0f, 1.0f, 1.0f, 1.0f},
};
Vec4u stencil[2] = {{0, 0, 0, 0}, {1, 1, 1, 1}};
diff --git a/renderdoc/driver/gl/gl_driver.cpp b/renderdoc/driver/gl/gl_driver.cpp
index 9929d74fa..f8ad55105 100644
--- a/renderdoc/driver/gl/gl_driver.cpp
+++ b/renderdoc/driver/gl/gl_driver.cpp
@@ -1777,9 +1777,7 @@ void WrappedOpenGL::FreeTargetResource(ResourceId id)
switch(resource.Namespace)
{
- case eResShader:
- glDeleteShader(resource.name);
- break;
+ case eResShader: glDeleteShader(resource.name); break;
// a compiled shader could have been promoted to a program if it were a glCreateShaderProgramv
case eResProgram: glDeleteProgram(resource.name); break;
default: RDCERR("Unexpected resource type to be freed"); break;
@@ -2496,8 +2494,9 @@ bool WrappedOpenGL::EndFrameCapture(DeviceOwnedWindow devWnd)
{
ContextData &ctxdata = GetCtxData();
- RenderText(0.0f, 0.0f, StringFormat::Fmt("Failed to capture frame %u: %s",
- m_CapturedFrames.back().frameNumber, reasonString));
+ RenderText(0.0f, 0.0f,
+ StringFormat::Fmt("Failed to capture frame %u: %s",
+ m_CapturedFrames.back().frameNumber, reasonString));
// swallow all errors we might have inadvertantly caused. This is
// better than letting an error propagate and maybe screw up the
diff --git a/renderdoc/driver/gl/gl_hooks.cpp b/renderdoc/driver/gl/gl_hooks.cpp
index 1b58c5c97..b34cf9477 100644
--- a/renderdoc/driver/gl/gl_hooks.cpp
+++ b/renderdoc/driver/gl/gl_hooks.cpp
@@ -331,7 +331,7 @@ void GLHook::RegisterHooks()
#if ENABLED(RDOC_APPLE)
-// dlsym is unreliable with interposing, we must fetch the functions directly here at compile-time.
+ // dlsym is unreliable with interposing, we must fetch the functions directly here at compile-time.
#undef APPLE_FUNC
#define APPLE_FUNC(function) CONCAT(unsupported_real_, function) = &function;
diff --git a/renderdoc/driver/gl/gl_pixelhistory.cpp b/renderdoc/driver/gl/gl_pixelhistory.cpp
index 515608be3..7b9881d35 100644
--- a/renderdoc/driver/gl/gl_pixelhistory.cpp
+++ b/renderdoc/driver/gl/gl_pixelhistory.cpp
@@ -707,7 +707,10 @@ void CopyMSSample(WrappedOpenGL *driver, const GLPixelHistoryResources &resource
driver->glUniform1i(depthMSLoc, 0);
driver->glUniform1i(stencilMSLoc, 1);
- uint32_t newUniforms[6] = {uint32_t(sampleIdx), uint32_t(x), uint32_t(y), 1,
+ uint32_t newUniforms[6] = {uint32_t(sampleIdx),
+ uint32_t(x),
+ uint32_t(y),
+ 1,
copyFramebuffer.dsTextureId != 0 || copyFramebuffer.depthTextureId != 0,
copyFramebuffer.dsTextureId != 0 ||
copyFramebuffer.stencilTextureId !=
diff --git a/renderdoc/driver/gl/gl_postvs.cpp b/renderdoc/driver/gl/gl_postvs.cpp
index 4fe2ef066..8fe4ae010 100644
--- a/renderdoc/driver/gl/gl_postvs.cpp
+++ b/renderdoc/driver/gl/gl_postvs.cpp
@@ -102,7 +102,10 @@ static void MakeVaryingsFromShaderReflection(ShaderReflection &refl, rdcarray 0)
diff --git a/renderdoc/driver/gl/gl_program_iterate.cpp b/renderdoc/driver/gl/gl_program_iterate.cpp
index 02f17c3ab..b623d7881 100644
--- a/renderdoc/driver/gl/gl_program_iterate.cpp
+++ b/renderdoc/driver/gl/gl_program_iterate.cpp
@@ -758,9 +758,7 @@ static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state,
case eGL_DOUBLE:
case eGL_DOUBLE_VEC2:
case eGL_DOUBLE_VEC3:
- case eGL_DOUBLE_VEC4:
- GL.glGetUniformdv(progSrc, srcLocation, dv);
- break;
+ case eGL_DOUBLE_VEC4: GL.glGetUniformdv(progSrc, srcLocation, dv); break;
// treat all samplers as just an int (since they just store their binding value)
case eGL_SAMPLER_1D:
@@ -838,9 +836,7 @@ static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state,
case eGL_INT:
case eGL_INT_VEC2:
case eGL_INT_VEC3:
- case eGL_INT_VEC4:
- GL.glGetUniformiv(progSrc, srcLocation, iv);
- break;
+ case eGL_INT_VEC4: GL.glGetUniformiv(progSrc, srcLocation, iv); break;
// bools are unsigned integers
case eGL_UNSIGNED_INT:
case eGL_BOOL:
diff --git a/renderdoc/driver/gl/gl_rendermesh.cpp b/renderdoc/driver/gl/gl_rendermesh.cpp
index 396976aa9..1fe6b3e5f 100644
--- a/renderdoc/driver/gl/gl_rendermesh.cpp
+++ b/renderdoc/driver/gl/gl_rendermesh.cpp
@@ -653,7 +653,10 @@ void GLReplay::RenderMesh(uint32_t eventId, const rdcarray &secondar
drv.glUnmapBuffer(eGL_UNIFORM_BUFFER);
FloatVector vertSprite[4] = {
- activeVertex, activeVertex, activeVertex, activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
};
drv.glBindBuffer(eGL_ARRAY_BUFFER, DebugData.triHighlightBuffer);
diff --git a/renderdoc/driver/gl/gl_renderstate.cpp b/renderdoc/driver/gl/gl_renderstate.cpp
index 1748fa5e5..a162ed9de 100644
--- a/renderdoc/driver/gl/gl_renderstate.cpp
+++ b/renderdoc/driver/gl/gl_renderstate.cpp
@@ -957,23 +957,36 @@ void GLRenderState::FetchState(WrappedOpenGL *driver)
GLenum maxcount;
} idxBufs[] = {
{
- AtomicCounter, ARRAY_COUNT(AtomicCounter), eGL_ATOMIC_COUNTER_BUFFER_BINDING,
- eGL_ATOMIC_COUNTER_BUFFER_START, eGL_ATOMIC_COUNTER_BUFFER_SIZE,
+ AtomicCounter,
+ ARRAY_COUNT(AtomicCounter),
+ eGL_ATOMIC_COUNTER_BUFFER_BINDING,
+ eGL_ATOMIC_COUNTER_BUFFER_START,
+ eGL_ATOMIC_COUNTER_BUFFER_SIZE,
eGL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS,
},
{
- ShaderStorage, ARRAY_COUNT(ShaderStorage), eGL_SHADER_STORAGE_BUFFER_BINDING,
- eGL_SHADER_STORAGE_BUFFER_START, eGL_SHADER_STORAGE_BUFFER_SIZE,
+ ShaderStorage,
+ ARRAY_COUNT(ShaderStorage),
+ eGL_SHADER_STORAGE_BUFFER_BINDING,
+ eGL_SHADER_STORAGE_BUFFER_START,
+ eGL_SHADER_STORAGE_BUFFER_SIZE,
eGL_MAX_SHADER_STORAGE_BUFFER_BINDINGS,
},
{
- TransformFeedback, ARRAY_COUNT(TransformFeedback), eGL_TRANSFORM_FEEDBACK_BUFFER_BINDING,
- eGL_TRANSFORM_FEEDBACK_BUFFER_START, eGL_TRANSFORM_FEEDBACK_BUFFER_SIZE,
+ TransformFeedback,
+ ARRAY_COUNT(TransformFeedback),
+ eGL_TRANSFORM_FEEDBACK_BUFFER_BINDING,
+ eGL_TRANSFORM_FEEDBACK_BUFFER_START,
+ eGL_TRANSFORM_FEEDBACK_BUFFER_SIZE,
eGL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
},
{
- UniformBinding, ARRAY_COUNT(UniformBinding), eGL_UNIFORM_BUFFER_BINDING,
- eGL_UNIFORM_BUFFER_START, eGL_UNIFORM_BUFFER_SIZE, eGL_MAX_UNIFORM_BUFFER_BINDINGS,
+ UniformBinding,
+ ARRAY_COUNT(UniformBinding),
+ eGL_UNIFORM_BUFFER_BINDING,
+ eGL_UNIFORM_BUFFER_START,
+ eGL_UNIFORM_BUFFER_SIZE,
+ eGL_MAX_UNIFORM_BUFFER_BINDINGS,
},
};
@@ -1423,19 +1436,27 @@ void GLRenderState::ApplyState(WrappedOpenGL *driver)
GLenum maxcount;
} idxBufs[] = {
{
- AtomicCounter, ARRAY_COUNT(AtomicCounter), eGL_ATOMIC_COUNTER_BUFFER,
+ AtomicCounter,
+ ARRAY_COUNT(AtomicCounter),
+ eGL_ATOMIC_COUNTER_BUFFER,
eGL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS,
},
{
- ShaderStorage, ARRAY_COUNT(ShaderStorage), eGL_SHADER_STORAGE_BUFFER,
+ ShaderStorage,
+ ARRAY_COUNT(ShaderStorage),
+ eGL_SHADER_STORAGE_BUFFER,
eGL_MAX_SHADER_STORAGE_BUFFER_BINDINGS,
},
{
- TransformFeedback, ARRAY_COUNT(TransformFeedback), eGL_TRANSFORM_FEEDBACK_BUFFER,
+ TransformFeedback,
+ ARRAY_COUNT(TransformFeedback),
+ eGL_TRANSFORM_FEEDBACK_BUFFER,
eGL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
},
{
- UniformBinding, ARRAY_COUNT(UniformBinding), eGL_UNIFORM_BUFFER,
+ UniformBinding,
+ ARRAY_COUNT(UniformBinding),
+ eGL_UNIFORM_BUFFER,
eGL_MAX_UNIFORM_BUFFER_BINDINGS,
},
};
diff --git a/renderdoc/driver/gl/gl_rendertexture.cpp b/renderdoc/driver/gl/gl_rendertexture.cpp
index 4f58b96d1..5d3b6eadd 100644
--- a/renderdoc/driver/gl/gl_rendertexture.cpp
+++ b/renderdoc/driver/gl/gl_rendertexture.cpp
@@ -422,8 +422,9 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
if(cfg.subresource.sample == ~0U)
drv.glProgramUniform1i(customProgram, loc, -texDetails.samples);
else
- drv.glProgramUniform1i(customProgram, loc, (int)RDCCLAMP(cfg.subresource.sample, 0U,
- (uint32_t)texDetails.samples - 1));
+ drv.glProgramUniform1i(
+ customProgram, loc,
+ (int)RDCCLAMP(cfg.subresource.sample, 0U, (uint32_t)texDetails.samples - 1));
}
loc = drv.glGetUniformLocation(customProgram, "RENDERDOC_TextureType");
diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp
index 2634d43cd..51f28ae99 100644
--- a/renderdoc/driver/gl/gl_replay.cpp
+++ b/renderdoc/driver/gl/gl_replay.cpp
@@ -3039,7 +3039,7 @@ void GLReplay::GetTextureData(ResourceId tex, const Subresource &sub,
dst = data.data() + d * sliceSize;
src = dst + (height - 1) * rowSize;
- for(GLsizei i = 0; i> 1; i++)
+ for(GLsizei i = 0; i < height >> 1; i++)
{
memcpy(row, src, rowSize);
memcpy(src, dst, rowSize);
@@ -3978,7 +3978,9 @@ rdcarray GetReplayVersions(RDCDriver api)
if(api == RDCDriver::OpenGLES)
{
return {
- {3, 2}, {3, 1}, {3, 0},
+ {3, 2},
+ {3, 1},
+ {3, 0},
};
}
else
diff --git a/renderdoc/driver/gl/gl_resources.cpp b/renderdoc/driver/gl/gl_resources.cpp
index a54cb4471..e49a81f1a 100644
--- a/renderdoc/driver/gl/gl_resources.cpp
+++ b/renderdoc/driver/gl/gl_resources.cpp
@@ -95,48 +95,39 @@ size_t GetCompressedByteSize(GLsizei w, GLsizei h, GLsizei d, GLenum internalfor
case eGL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case eGL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case eGL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
- return (AlignUp4(w) * AlignUp4(h) * d) / 2;
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return (AlignUp4(w) * AlignUp4(h) * d) / 2;
// BC2
case eGL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return (AlignUp4(w) * AlignUp4(h) * d);
// BC3
case eGL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return (AlignUp4(w) * AlignUp4(h) * d);
// BC4
case eGL_COMPRESSED_RED_RGTC1:
- case eGL_COMPRESSED_SIGNED_RED_RGTC1:
- return (AlignUp4(w) * AlignUp4(h) * d) / 2;
+ case eGL_COMPRESSED_SIGNED_RED_RGTC1: return (AlignUp4(w) * AlignUp4(h) * d) / 2;
// BC5
case eGL_COMPRESSED_RG_RGTC2:
- case eGL_COMPRESSED_SIGNED_RG_RGTC2:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_SIGNED_RG_RGTC2: return (AlignUp4(w) * AlignUp4(h) * d);
// BC6
case eGL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
- case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB: return (AlignUp4(w) * AlignUp4(h) * d);
// BC7
case eGL_COMPRESSED_RGBA_BPTC_UNORM_ARB:
- case eGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB: return (AlignUp4(w) * AlignUp4(h) * d);
// ETC1
case eGL_ETC1_RGB8_OES:
// ETC2
case eGL_COMPRESSED_RGB8_ETC2:
case eGL_COMPRESSED_SRGB8_ETC2:
case eGL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
- case eGL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
- return (AlignUp4(w) * AlignUp4(h) * d) / 2;
+ case eGL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: return (AlignUp4(w) * AlignUp4(h) * d) / 2;
// EAC
case eGL_COMPRESSED_RGBA8_ETC2_EAC:
case eGL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: return (AlignUp4(w) * AlignUp4(h) * d);
case eGL_COMPRESSED_R11_EAC:
case eGL_COMPRESSED_SIGNED_R11_EAC: return (AlignUp4(w) * AlignUp4(h) * d) / 2;
case eGL_COMPRESSED_RG11_EAC:
- case eGL_COMPRESSED_SIGNED_RG11_EAC:
- return (AlignUp4(w) * AlignUp4(h) * d);
+ case eGL_COMPRESSED_SIGNED_RG11_EAC: return (AlignUp4(w) * AlignUp4(h) * d);
// ASTC
case eGL_COMPRESSED_RGBA_ASTC_4x4_KHR:
case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
@@ -345,8 +336,7 @@ rdcfixedarray GetCompressedBlockSize(GLenum internalformat)
case eGL_COMPRESSED_R11_EAC:
case eGL_COMPRESSED_SIGNED_R11_EAC:
case eGL_COMPRESSED_RG11_EAC:
- case eGL_COMPRESSED_SIGNED_RG11_EAC:
- return {4u, 4u, 1u};
+ case eGL_COMPRESSED_SIGNED_RG11_EAC: return {4u, 4u, 1u};
// ASTC
case eGL_COMPRESSED_RGBA_ASTC_4x4_KHR:
case eGL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
diff --git a/renderdoc/driver/gl/glx_platform.cpp b/renderdoc/driver/gl/glx_platform.cpp
index 84e5aeb39..4f1970871 100644
--- a/renderdoc/driver/gl/glx_platform.cpp
+++ b/renderdoc/driver/gl/glx_platform.cpp
@@ -513,20 +513,20 @@ bool GLXDispatchTable::PopulateForReplay()
bool symbols_ok = true;
-#define LOAD_FUNC(func) \
- if(!this->func) \
- this->func = (CONCAT(PFN_, func))Process::GetFunctionAddress(handle, STRINGIZE(func)); \
- \
- if(!func && this->glXGetProcAddressARB) \
- this->func = (CONCAT(PFN_, func)) this->glXGetProcAddressARB((const GLubyte *)STRINGIZE(func)); \
- \
- if(!func && this->glXGetProcAddress) \
- this->func = (CONCAT(PFN_, func)) this->glXGetProcAddress((const GLubyte *)STRINGIZE(func)); \
- \
- if(!func) \
- { \
- symbols_ok = false; \
- RDCWARN("Unable to load '%s'", STRINGIZE(func)); \
+#define LOAD_FUNC(func) \
+ if(!this->func) \
+ this->func = (CONCAT(PFN_, func))Process::GetFunctionAddress(handle, STRINGIZE(func)); \
+ \
+ if(!func && this->glXGetProcAddressARB) \
+ this->func = (CONCAT(PFN_, func))this->glXGetProcAddressARB((const GLubyte *)STRINGIZE(func)); \
+ \
+ if(!func && this->glXGetProcAddress) \
+ this->func = (CONCAT(PFN_, func))this->glXGetProcAddress((const GLubyte *)STRINGIZE(func)); \
+ \
+ if(!func) \
+ { \
+ symbols_ok = false; \
+ RDCWARN("Unable to load '%s'", STRINGIZE(func)); \
}
GLX_HOOKED_SYMBOLS(LOAD_FUNC)
diff --git a/renderdoc/driver/gl/wgl_hooks.cpp b/renderdoc/driver/gl/wgl_hooks.cpp
index e3f9f2472..db1270510 100644
--- a/renderdoc/driver/gl/wgl_hooks.cpp
+++ b/renderdoc/driver/gl/wgl_hooks.cpp
@@ -664,11 +664,11 @@ void WGLHook::RegisterHooks()
LibraryHooks::RegisterLibraryHook("user32.dll", NULL);
// register EGL hooks
-#define WGL_REGISTER(library, func) \
- if(CheckConstParam(sizeof(library) > 2)) \
- { \
- LibraryHooks::RegisterFunctionHook(library, FunctionHook(STRINGIZE(func), (void **)&WGL.func, \
- (void *)&CONCAT(func, _hooked))); \
+#define WGL_REGISTER(library, func) \
+ if(CheckConstParam(sizeof(library) > 2)) \
+ { \
+ LibraryHooks::RegisterFunctionHook( \
+ library, FunctionHook(STRINGIZE(func), (void **)&WGL.func, (void *)&CONCAT(func, _hooked))); \
}
WGL_HOOKED_SYMBOLS(WGL_REGISTER)
#undef WGL_REGISTER
diff --git a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp
index cb92c913f..d4d15c391 100644
--- a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp
+++ b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp
@@ -2132,10 +2132,8 @@ bool WrappedOpenGL::Serialise_glBlitNamedFramebuffer(SerialiserType &ser,
GLint dstX0, GLint dstY0, GLint dstX1,
GLint dstY1, GLbitfield mask, GLenum filter)
{
- SERIALISE_ELEMENT_LOCAL(readFramebuffer, FramebufferRes(GetCtx(), readFramebufferHandle))
- .Important();
- SERIALISE_ELEMENT_LOCAL(drawFramebuffer, FramebufferRes(GetCtx(), drawFramebufferHandle))
- .Important();
+ SERIALISE_ELEMENT_LOCAL(readFramebuffer, FramebufferRes(GetCtx(), readFramebufferHandle)).Important();
+ SERIALISE_ELEMENT_LOCAL(drawFramebuffer, FramebufferRes(GetCtx(), drawFramebufferHandle)).Important();
SERIALISE_ELEMENT(srcX0);
SERIALISE_ELEMENT(srcY0);
SERIALISE_ELEMENT(srcX1);
diff --git a/renderdoc/driver/ihv/nv/nv_counter_enumerator.cpp b/renderdoc/driver/ihv/nv/nv_counter_enumerator.cpp
index 87107a977..782bc6de2 100644
--- a/renderdoc/driver/ihv/nv/nv_counter_enumerator.cpp
+++ b/renderdoc/driver/ihv/nv/nv_counter_enumerator.cpp
@@ -44,8 +44,7 @@ struct NVCounterEnumerator::Impl
public:
nv::perf::MetricsEvaluator Evaluator;
- nv::perf::CounterConfiguration
- SelectedConfiguration; // configImage etc. for the current selection
+ nv::perf::CounterConfiguration SelectedConfiguration; // configImage etc. for the current selection
rdcarray SelectedExternalIds;
rdcarray SelectedEvalRequests;
size_t SelectedNumPasses;
@@ -420,7 +419,9 @@ bool NVCounterEnumerator::InitializeNvPerf()
{
rdcstr pluginsFolder = FileIO::GetAppFolderFilename("plugins/nv");
const char *paths[] = {
- pluginsFolder.c_str(), "./plugins/nv", ".",
+ pluginsFolder.c_str(),
+ "./plugins/nv",
+ ".",
};
NVPW_SetLibraryLoadPaths_Params params{NVPW_SetLibraryLoadPaths_Params_STRUCT_SIZE};
params.numPaths = sizeof(paths) / sizeof(paths[0]);
@@ -442,7 +443,7 @@ CounterDescription NVCounterEnumerator::LibraryNotFoundMessage()
#elif ENABLED(RDOC_LINUX)
"plugins/nv/libnvperf_grfx_host.so"
#endif
- );
+ );
if(pluginPath.empty())
{
pluginPath =
diff --git a/renderdoc/driver/metal/metal_command_buffer_bridge.mm b/renderdoc/driver/metal/metal_command_buffer_bridge.mm
index 4acc05202..2bf1ebf1c 100644
--- a/renderdoc/driver/metal/metal_command_buffer_bridge.mm
+++ b/renderdoc/driver/metal/metal_command_buffer_bridge.mm
@@ -243,8 +243,8 @@
return [self.real parallelRenderCommandEncoderWithDescriptor:renderPassDescriptor];
}
-- (nullable id)resourceStateCommandEncoder
- API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0))
+- (nullable id)
+ resourceStateCommandEncoder API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0))
{
METAL_NOT_HOOKED();
return [self.real resourceStateCommandEncoder];
@@ -258,8 +258,8 @@
return [self.real resourceStateCommandEncoderWithDescriptor:resourceStatePassDescriptor];
}
-- (nullable id)accelerationStructureCommandEncoder
- API_AVAILABLE(macos(11.0), ios(14.0))
+- (nullable id)
+ accelerationStructureCommandEncoder API_AVAILABLE(macos(11.0), ios(14.0))
{
METAL_NOT_HOOKED();
return [self.real accelerationStructureCommandEncoder];
diff --git a/renderdoc/driver/metal/metal_command_queue_bridge.mm b/renderdoc/driver/metal/metal_command_queue_bridge.mm
index 674e5514d..67f109e7d 100644
--- a/renderdoc/driver/metal/metal_command_queue_bridge.mm
+++ b/renderdoc/driver/metal/metal_command_queue_bridge.mm
@@ -100,8 +100,8 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
-- (void)insertDebugCaptureBoundary
- API_DEPRECATED("Use MTLCaptureScope instead", macos(10.11, 10.13), ios(8.0, 11.0))
+- (void)insertDebugCaptureBoundary API_DEPRECATED("Use MTLCaptureScope instead",
+ macos(10.11, 10.13), ios(8.0, 11.0))
{
METAL_NOT_HOOKED();
return [self.real insertDebugCaptureBoundary];
diff --git a/renderdoc/driver/metal/metal_common.cpp b/renderdoc/driver/metal/metal_common.cpp
index b9a2377fb..611dcb43f 100644
--- a/renderdoc/driver/metal/metal_common.cpp
+++ b/renderdoc/driver/metal/metal_common.cpp
@@ -1558,7 +1558,8 @@ TEST_CASE("Metal formats", "[format][metal]")
const uint32_t width = 24, height = 24;
rdcarray > > yuvTests = {
- {MTL::PixelFormatGBGR422, {24 * 24 * 2}}, {MTL::PixelFormatBGRG422, {24 * 24 * 2}},
+ {MTL::PixelFormatGBGR422, {24 * 24 * 2}},
+ {MTL::PixelFormatBGRG422, {24 * 24 * 2}},
};
for(rdcpair > yuvTest : yuvTests)
diff --git a/renderdoc/driver/metal/metal_core.cpp b/renderdoc/driver/metal/metal_core.cpp
index 1b69bdefe..6e0360778 100644
--- a/renderdoc/driver/metal/metal_core.cpp
+++ b/renderdoc/driver/metal/metal_core.cpp
@@ -405,8 +405,7 @@ bool WrappedMTLDevice::ProcessChunk(ReadSerialiser &ser, MetalChunk chunk)
case MetalChunk::MTLBlitCommandEncoder_copyIndirectCommandBuffer: METAL_CHUNK_NOT_HANDLED();
case MetalChunk::MTLBlitCommandEncoder_optimizeIndirectCommandBuffer: METAL_CHUNK_NOT_HANDLED();
case MetalChunk::MTLBlitCommandEncoder_sampleCountersInBuffer: METAL_CHUNK_NOT_HANDLED();
- case MetalChunk::MTLBlitCommandEncoder_resolveCounters:
- METAL_CHUNK_NOT_HANDLED();
+ case MetalChunk::MTLBlitCommandEncoder_resolveCounters: METAL_CHUNK_NOT_HANDLED();
// no default to get compile error if a chunk is not handled
case MetalChunk::Max: break;
diff --git a/renderdoc/driver/metal/metal_device.cpp b/renderdoc/driver/metal/metal_device.cpp
index 87b298fba..a058ca807 100644
--- a/renderdoc/driver/metal/metal_device.cpp
+++ b/renderdoc/driver/metal/metal_device.cpp
@@ -109,8 +109,8 @@ CA::MetalDrawable *hooked_CAMetalLayer_nextDrawable(id self, SEL _cmd)
RDCASSERTEQUAL(Threading::GetTLSValue(WrappedMTLDevice::g_nextDrawableTLSSlot), 0);
Threading::SetTLSValue(WrappedMTLDevice::g_nextDrawableTLSSlot, (void *)(uintptr_t) true);
CA::MetalDrawable *caMtlDrawable =
- ((CA::MetalDrawable * (*)(id, SEL))WrappedMTLDevice::g_real_CAMetalLayer_nextDrawable)(self,
- _cmd);
+ ((CA::MetalDrawable * (*)(id, SEL)) WrappedMTLDevice::g_real_CAMetalLayer_nextDrawable)(self,
+ _cmd);
device->RegisterDrawableInfo(caMtlDrawable);
Threading::SetTLSValue(WrappedMTLDevice::g_nextDrawableTLSSlot, (void *)(uintptr_t) false);
return caMtlDrawable;
diff --git a/renderdoc/driver/metal/metal_device_bridge.mm b/renderdoc/driver/metal/metal_device_bridge.mm
index 308e92c0f..2ccd2765d 100644
--- a/renderdoc/driver/metal/metal_device_bridge.mm
+++ b/renderdoc/driver/metal/metal_device_bridge.mm
@@ -170,9 +170,8 @@
return GetWrapped(self)->supportsPullModelInterpolation();
}
-- (BOOL)areBarycentricCoordsSupported
- API_DEPRECATED_WITH_REPLACEMENT("supportsShaderBarycentricCoordinates", macos(10.15, 13.0),
- ios(14.0, 16.0))API_UNAVAILABLE(tvos)
+- (BOOL)areBarycentricCoordsSupported API_DEPRECATED_WITH_REPLACEMENT(
+ "supportsShaderBarycentricCoordinates", macos(10.15, 13.0), ios(14.0, 16.0))API_UNAVAILABLE(tvos)
{
return GetWrapped(self)->areBarycentricCoordsSupported();
}
@@ -337,8 +336,9 @@
completionHandler:(MTLNewLibraryCompletionHandler)completionHandler
{
METAL_NOT_HOOKED();
- return
- [self.real newLibraryWithSource:source options:options completionHandler:completionHandler];
+ return [self.real newLibraryWithSource:source
+ options:options
+ completionHandler:completionHandler];
}
- (nullable id)newLibraryWithStitchedDescriptor:(MTLStitchedLibraryDescriptor *)descriptor
@@ -358,8 +358,8 @@
}
- (nullable id)
-newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
- error:(__autoreleasing NSError **)error
+ newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
+ error:(__autoreleasing NSError **)error
{
RDMTL::RenderPipelineDescriptor rdDescriptor((MTL::RenderPipelineDescriptor *)descriptor);
return id(
@@ -367,10 +367,10 @@ newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
}
- (nullable id)
-newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
- options:(MTLPipelineOption)options
- reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
- error:(__autoreleasing NSError **)error
+ newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
+ options:(MTLPipelineOption)options
+ reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
+ error:(__autoreleasing NSError **)error
{
METAL_NOT_HOOKED();
return [self.real newRenderPipelineStateWithDescriptor:descriptor
@@ -399,18 +399,18 @@ newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor
}
- (nullable id)
-newComputePipelineStateWithFunction:(id)computeFunction
- error:(__autoreleasing NSError **)error
+ newComputePipelineStateWithFunction:(id)computeFunction
+ error:(__autoreleasing NSError **)error
{
METAL_NOT_HOOKED();
return [self.real newComputePipelineStateWithFunction:computeFunction error:error];
}
- (nullable id)
-newComputePipelineStateWithFunction:(id)computeFunction
- options:(MTLPipelineOption)options
- reflection:(MTLAutoreleasedComputePipelineReflection *__nullable)reflection
- error:(__autoreleasing NSError **)error
+ newComputePipelineStateWithFunction:(id)computeFunction
+ options:(MTLPipelineOption)options
+ reflection:(MTLAutoreleasedComputePipelineReflection *__nullable)reflection
+ error:(__autoreleasing NSError **)error
{
METAL_NOT_HOOKED();
return [self.real newComputePipelineStateWithFunction:computeFunction
@@ -439,10 +439,10 @@ newComputePipelineStateWithFunction:(id)computeFunction
}
- (nullable id)
-newComputePipelineStateWithDescriptor:(MTLComputePipelineDescriptor *)descriptor
- options:(MTLPipelineOption)options
- reflection:(MTLAutoreleasedComputePipelineReflection *__nullable)reflection
- error:(__autoreleasing NSError **)error
+ newComputePipelineStateWithDescriptor:(MTLComputePipelineDescriptor *)descriptor
+ options:(MTLPipelineOption)options
+ reflection:(MTLAutoreleasedComputePipelineReflection *__nullable)reflection
+ error:(__autoreleasing NSError **)error
API_AVAILABLE(macos(10.11), ios(9.0))
{
METAL_NOT_HOOKED();
@@ -501,10 +501,10 @@ newComputePipelineStateWithDescriptor:(MTLComputePipelineDescriptor *)descriptor
}
- (nullable id)
-newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor
- options:(MTLPipelineOption)options
- reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
- error:(__autoreleasing NSError **)error
+ newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor
+ options:(MTLPipelineOption)options
+ reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
+ error:(__autoreleasing NSError **)error
API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
{
METAL_NOT_HOOKED();
@@ -528,10 +528,10 @@ newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)desc
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_0
- (nullable id)
-newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor *)descriptor
- options:(MTLPipelineOption)options
- reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
- error:(__autoreleasing NSError **)error
+ newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor *)descriptor
+ options:(MTLPipelineOption)options
+ reflection:(MTLAutoreleasedRenderPipelineReflection *__nullable)reflection
+ error:(__autoreleasing NSError **)error
API_AVAILABLE(macos(13.0), ios(16.0))
{
METAL_NOT_HOOKED();
@@ -600,9 +600,9 @@ newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor *)desc
}
- (nullable id)
-newIndirectCommandBufferWithDescriptor:(MTLIndirectCommandBufferDescriptor *)descriptor
- maxCommandCount:(NSUInteger)maxCount
- options:(MTLResourceOptions)options
+ newIndirectCommandBufferWithDescriptor:(MTLIndirectCommandBufferDescriptor *)descriptor
+ maxCommandCount:(NSUInteger)maxCount
+ options:(MTLResourceOptions)options
API_AVAILABLE(macos(10.14), ios(12.0))
{
METAL_NOT_HOOKED();
diff --git a/renderdoc/driver/metal/metal_function_bridge.mm b/renderdoc/driver/metal/metal_function_bridge.mm
index c579a5c38..58d913bbb 100644
--- a/renderdoc/driver/metal/metal_function_bridge.mm
+++ b/renderdoc/driver/metal/metal_function_bridge.mm
@@ -110,8 +110,8 @@
return self.real.name;
}
-- (NSDictionary *)functionConstantsDictionary
- API_AVAILABLE(macos(10.12), ios(10.0))
+- (NSDictionary *)
+ functionConstantsDictionary API_AVAILABLE(macos(10.12), ios(10.0))
{
return self.real.functionConstantsDictionary;
}
diff --git a/renderdoc/driver/metal/metal_hook_bridge.mm b/renderdoc/driver/metal/metal_hook_bridge.mm
index a392eeb53..0365bc122 100644
--- a/renderdoc/driver/metal/metal_hook_bridge.mm
+++ b/renderdoc/driver/metal/metal_hook_bridge.mm
@@ -85,10 +85,11 @@ extern void AppleRegisterRealSymbol(const char *functionName, void *address);
void MetalHook::RegisterGlobalHookedMetalFunctions()
{
-#define METAL_FUNC(func) \
- AppleRegisterRealSymbol(STRINGIZE(func), (void *)&::func); \
- LibraryHooks::RegisterFunctionHook("Metal", FunctionHook(STRINGIZE(func), (void **)&METAL.func, \
- (void *)&METAL_EXPORT_NAME(func)));
+#define METAL_FUNC(func) \
+ AppleRegisterRealSymbol(STRINGIZE(func), (void *)&::func); \
+ LibraryHooks::RegisterFunctionHook( \
+ "Metal", \
+ FunctionHook(STRINGIZE(func), (void **)&METAL.func, (void *)&METAL_EXPORT_NAME(func)));
ForEachMetalSupported();
#undef METAL_FUNC
diff --git a/renderdoc/driver/metal/metal_render_command_encoder_bridge.mm b/renderdoc/driver/metal/metal_render_command_encoder_bridge.mm
index ff4d4f22f..db9ed817b 100644
--- a/renderdoc/driver/metal/metal_render_command_encoder_bridge.mm
+++ b/renderdoc/driver/metal/metal_render_command_encoder_bridge.mm
@@ -413,8 +413,8 @@
API_AVAILABLE(macos(12.0), ios(15.0))
{
METAL_NOT_HOOKED();
- return
- [self.real setFragmentAccelerationStructure:accelerationStructure atBufferIndex:bufferIndex];
+ return [self.real setFragmentAccelerationStructure:accelerationStructure
+ atBufferIndex:bufferIndex];
}
- (void)setBlendColorRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha
@@ -851,9 +851,8 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
-- (void)textureBarrier
- API_DEPRECATED_WITH_REPLACEMENT("memoryBarrierWithScope:MTLBarrierScopeRenderTargets",
- macos(10.11, 10.14))API_UNAVAILABLE(ios)
+- (void)textureBarrier API_DEPRECATED_WITH_REPLACEMENT(
+ "memoryBarrierWithScope:MTLBarrierScopeRenderTargets", macos(10.11, 10.14))API_UNAVAILABLE(ios)
{
METAL_NOT_HOOKED();
return [self.real textureBarrier];
@@ -1094,8 +1093,8 @@
withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0))
{
METAL_NOT_HOOKED();
- return
- [self.real setTileIntersectionFunctionTables:intersectionFunctionTable withBufferRange:range];
+ return [self.real setTileIntersectionFunctionTables:intersectionFunctionTable
+ withBufferRange:range];
}
- (void)setTileAccelerationStructure:(nullable id)accelerationStructure
@@ -1226,8 +1225,9 @@
withBarrier:(BOOL)barrier API_AVAILABLE(macos(10.15), ios(14.0))
{
METAL_NOT_HOOKED();
- return
- [self.real sampleCountersInBuffer:sampleBuffer atSampleIndex:sampleIndex withBarrier:barrier];
+ return [self.real sampleCountersInBuffer:sampleBuffer
+ atSampleIndex:sampleIndex
+ withBarrier:barrier];
}
@end
diff --git a/renderdoc/driver/metal/metal_render_pipeline_state_bridge.mm b/renderdoc/driver/metal/metal_render_pipeline_state_bridge.mm
index f1dc0f775..102274a44 100644
--- a/renderdoc/driver/metal/metal_render_pipeline_state_bridge.mm
+++ b/renderdoc/driver/metal/metal_render_pipeline_state_bridge.mm
@@ -75,20 +75,20 @@
return id(GetWrapped(self)->GetDevice());
}
-- (NSUInteger)maxTotalThreadsPerThreadgroup
- API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
+- (NSUInteger)maxTotalThreadsPerThreadgroup API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0),
+ tvos(14.5))
{
return self.real.maxTotalThreadsPerThreadgroup;
}
-- (BOOL)threadgroupSizeMatchesTileSize
- API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
+- (BOOL)threadgroupSizeMatchesTileSize API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0),
+ tvos(14.5))
{
return self.real.threadgroupSizeMatchesTileSize;
}
-- (NSUInteger)imageblockSampleLength
- API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
+- (NSUInteger)imageblockSampleLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0),
+ tvos(14.5))
{
return self.real.imageblockSampleLength;
}
@@ -164,8 +164,8 @@
}
- (nullable id)
-newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor *_Nonnull)descriptor
- stage:(MTLRenderStages)stage
+ newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor *_Nonnull)descriptor
+ stage:(MTLRenderStages)stage
API_AVAILABLE(macos(12.0), ios(15.0))
{
METAL_NOT_HOOKED();
@@ -173,9 +173,9 @@ newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescript
}
- (nullable id)
-newRenderPipelineStateWithAdditionalBinaryFunctions:
- (nonnull MTLRenderPipelineFunctionsDescriptor *)additionalBinaryFunctions
- error:(__autoreleasing NSError **)error
+ newRenderPipelineStateWithAdditionalBinaryFunctions:
+ (nonnull MTLRenderPipelineFunctionsDescriptor *)additionalBinaryFunctions
+ error:(__autoreleasing NSError **)error
API_AVAILABLE(macos(12.0), ios(15.0))
{
METAL_NOT_HOOKED();
diff --git a/renderdoc/driver/metal/metal_resources.cpp b/renderdoc/driver/metal/metal_resources.cpp
index ce8d31636..22793dfdf 100644
--- a/renderdoc/driver/metal/metal_resources.cpp
+++ b/renderdoc/driver/metal/metal_resources.cpp
@@ -42,8 +42,11 @@ ResourceId GetResID(WrappedMTLObject *obj)
return obj->m_ID;
}
-#define IMPLEMENT_WRAPPED_TYPE_HELPERS(CPPTYPE) \
- MTL::CPPTYPE *Unwrap(WrappedMTL##CPPTYPE *obj) { return Unwrap(obj); }
+#define IMPLEMENT_WRAPPED_TYPE_HELPERS(CPPTYPE) \
+ MTL::CPPTYPE *Unwrap(WrappedMTL##CPPTYPE *obj) \
+ { \
+ return Unwrap(obj); \
+ }
METALCPP_WRAPPED_PROTOCOLS(IMPLEMENT_WRAPPED_TYPE_HELPERS)
#undef IMPLEMENT_WRAPPED_TYPE_HELPERS
diff --git a/renderdoc/driver/metal/metal_texture_bridge.mm b/renderdoc/driver/metal/metal_texture_bridge.mm
index 2516dc2f2..a78793be4 100644
--- a/renderdoc/driver/metal/metal_texture_bridge.mm
+++ b/renderdoc/driver/metal/metal_texture_bridge.mm
@@ -138,8 +138,8 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-- (id)rootResource
- API_DEPRECATED("Use parentTexture or buffer instead", macos(10.11, 10.12), ios(8.0, 10.0))
+- (id)rootResource API_DEPRECATED("Use parentTexture or buffer instead",
+ macos(10.11, 10.12), ios(8.0, 10.0))
{
return self.real.rootResource;
}
diff --git a/renderdoc/driver/metal/metal_types.cpp b/renderdoc/driver/metal/metal_types.cpp
index ddaa6137c..f7e3240df 100644
--- a/renderdoc/driver/metal/metal_types.cpp
+++ b/renderdoc/driver/metal/metal_types.cpp
@@ -544,7 +544,7 @@ void RenderPassStencilAttachmentDescriptor::CopyTo(MTL::RenderPassStencilAttachm
RenderPassSampleBufferAttachmentDescriptor::RenderPassSampleBufferAttachmentDescriptor(
MTL::RenderPassSampleBufferAttachmentDescriptor *objc)
: // TODO: when WrappedMTLCounterSampleBuffer exists
- // sampleBuffer(GetWrapped(objc->sampleBuffer())),
+ // sampleBuffer(GetWrapped(objc->sampleBuffer())),
startOfVertexSampleIndex(objc->startOfVertexSampleIndex()),
endOfVertexSampleIndex(objc->endOfVertexSampleIndex()),
startOfFragmentSampleIndex(objc->startOfFragmentSampleIndex()),
diff --git a/renderdoc/driver/metal/metal_types.h b/renderdoc/driver/metal/metal_types.h
index ae5a3da7d..1685e54ee 100644
--- a/renderdoc/driver/metal/metal_types.h
+++ b/renderdoc/driver/metal/metal_types.h
@@ -87,7 +87,10 @@ METALCPP_WRAPPED_PROTOCOLS(DECLARE_OBJC_HELPERS)
#define DECLARE_UNIMPLEMENTED_WRAPPED_CPP_HELPERS(CPPTYPE) \
class WrappedMTL##CPPTYPE; \
- inline MTL::CPPTYPE *Unwrap(WrappedMTL##CPPTYPE *obj) { return (MTL::CPPTYPE *)obj; }
+ inline MTL::CPPTYPE *Unwrap(WrappedMTL##CPPTYPE *obj) \
+ { \
+ return (MTL::CPPTYPE *)obj; \
+ }
METALCPP_UNIMPLEMENTED_WRAPPED_PROTOCOLS(DECLARE_UNIMPLEMENTED_WRAPPED_CPP_HELPERS)
#undef DECLARE_UNIMPLEMENTED_WRAPPED_CPP_HELPERS
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp
index 5bba39098..324622648 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp
@@ -363,10 +363,9 @@ DXBC::Reflection *Program::GuessReflection()
uint32_t idx = (uint32_t)dcl.operand.indices[0].index;
desc.name = StringFormat::Fmt("uav%u", idx);
- desc.type =
- DXBC::ShaderInputBind::TYPE_UAV_RWSTRUCTURED; // doesn't seem to be anything that
- // determines append vs consume vs
- // rwstructured
+ desc.type = DXBC::ShaderInputBind::TYPE_UAV_RWSTRUCTURED; // doesn't seem to be anything
+ // that determines append vs
+ // consume vs rwstructured
if(dcl.structured.hasCounter)
desc.type = DXBC::ShaderInputBind::TYPE_UAV_RWSTRUCTURED_WITH_COUNTER;
desc.space = dcl.space;
@@ -970,8 +969,7 @@ size_t NumOperands(OpcodeType op)
case OPCODE_GATHER4_C_FEEDBACK:
case OPCODE_GATHER4_PO_FEEDBACK: return 6;
case OPCODE_SAMPLE_D_CLAMP_FEEDBACK:
- case OPCODE_GATHER4_PO_C_FEEDBACK:
- return 7;
+ case OPCODE_GATHER4_PO_C_FEEDBACK: return 7;
// custom data doesn't have particular operands
case OPCODE_CUSTOMDATA:
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_editor.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_editor.cpp
index 0e0b24abf..762724533 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_editor.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_editor.cpp
@@ -90,10 +90,13 @@ static const rdcarray opcodeOrder = {
OPCODE_DCL_SAMPLER,
// sorted by space, then register. Types can be intermixed as a result
- OPCODE_DCL_RESOURCE, OPCODE_DCL_RESOURCE_RAW, OPCODE_DCL_RESOURCE_STRUCTURED,
+ OPCODE_DCL_RESOURCE,
+ OPCODE_DCL_RESOURCE_RAW,
+ OPCODE_DCL_RESOURCE_STRUCTURED,
// sorted by space, then register. Types can be intermixed as a result
- OPCODE_DCL_UNORDERED_ACCESS_VIEW_TYPED, OPCODE_DCL_UNORDERED_ACCESS_VIEW_RAW,
+ OPCODE_DCL_UNORDERED_ACCESS_VIEW_TYPED,
+ OPCODE_DCL_UNORDERED_ACCESS_VIEW_RAW,
OPCODE_DCL_UNORDERED_ACCESS_VIEW_STRUCTURED,
OPCODE_DCL_FUNCTION_BODY,
@@ -103,15 +106,20 @@ static const rdcarray opcodeOrder = {
OPCODE_DCL_INTERFACE,
// these can be mixed in signature order
- OPCODE_DCL_INPUT_PS, OPCODE_DCL_INPUT_PS_SIV,
+ OPCODE_DCL_INPUT_PS,
+ OPCODE_DCL_INPUT_PS_SIV,
// last of the input group
OPCODE_DCL_INPUT_PS_SGV,
// these can in any order
- OPCODE_DCL_INPUT, OPCODE_DCL_INPUT_SIV, OPCODE_DCL_INPUT_SGV,
+ OPCODE_DCL_INPUT,
+ OPCODE_DCL_INPUT_SIV,
+ OPCODE_DCL_INPUT_SGV,
// similarly in any order
- OPCODE_DCL_OUTPUT, OPCODE_DCL_OUTPUT_SIV, OPCODE_DCL_OUTPUT_SGV,
+ OPCODE_DCL_OUTPUT,
+ OPCODE_DCL_OUTPUT_SIV,
+ OPCODE_DCL_OUTPUT_SGV,
OPCODE_DCL_TEMPS,
@@ -139,7 +147,8 @@ static const rdcarray opcodeOrder = {
OPCODE_DCL_MAX_OUTPUT_VERTEX_COUNT,
// these happen in the separate phase declarations
- OPCODE_DCL_HS_FORK_PHASE_INSTANCE_COUNT, OPCODE_DCL_HS_JOIN_PHASE_INSTANCE_COUNT,
+ OPCODE_DCL_HS_FORK_PHASE_INSTANCE_COUNT,
+ OPCODE_DCL_HS_JOIN_PHASE_INSTANCE_COUNT,
};
size_t ProgramEditor::GetDeclarationPosition(OpcodeType op)
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp
index 35b8569f6..f348ad87e 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp
@@ -1245,7 +1245,8 @@ bool Program::DecodeOperand(uint32_t *&tokenStream, ToString flags, Operand &ret
uint32_t indexDim = Oper::IndexDimension.Get(OperandToken0);
OperandIndexType rep[] = {
- Oper::Index0.Get(OperandToken0), Oper::Index1.Get(OperandToken0),
+ Oper::Index0.Get(OperandToken0),
+ Oper::Index1.Get(OperandToken0),
Oper::Index2.Get(OperandToken0),
};
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_vendorext.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_vendorext.cpp
index bb75f2300..15c85cd10 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_vendorext.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_vendorext.cpp
@@ -102,8 +102,7 @@ DX12Op convert(DX11Op op)
case DX11Op::Max3U: return DX12Op::Max3U;
case DX11Op::Max3F: return DX12Op::Max3F;
case DX11Op::BaryCoord: return DX12Op::BaryCoord;
- case DX11Op::VtxParam:
- return DX12Op::VtxParam;
+ case DX11Op::VtxParam: return DX12Op::VtxParam;
// others match up exactly
default: return DX12Op(op);
}
@@ -870,8 +869,7 @@ void Program::PostprocessVendorExtensions()
switch(state)
{
case InstructionState::Broken:
- case InstructionState::AMDUAVAtomic:
- break;
+ case InstructionState::AMDUAVAtomic: break;
// in Nothing an increment marks the beginning of an instruction of some type
case InstructionState::Nothing:
{
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
index 75cbf94f7..e100b0f7d 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
@@ -364,9 +364,7 @@ CBufferVariableType DXBCContainer::ParseRDEFType(const RDEFHeader *h, const byte
case DXBC::VARTYPE_FLOAT:
case DXBC::VARTYPE_MIN8FLOAT:
case DXBC::VARTYPE_MIN10FLOAT:
- case DXBC::VARTYPE_MIN16FLOAT:
- ret.varType = VarType::Float;
- break;
+ case DXBC::VARTYPE_MIN16FLOAT: ret.varType = VarType::Float; break;
// new types are actually 16-bit, though alignment is still the same as 32-bit
case DXBC::VARTYPE_INT16: ret.varType = VarType::SShort; break;
case DXBC::VARTYPE_UINT16: ret.varType = VarType::UShort; break;
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.h b/renderdoc/driver/shaders/dxbc/dxbc_container.h
index 30baf9633..9f87c57d9 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_container.h
+++ b/renderdoc/driver/shaders/dxbc/dxbc_container.h
@@ -29,7 +29,6 @@
#include "api/replay/rdcarray.h"
#include "api/replay/rdcpair.h"
#include "api/replay/rdcstr.h"
-#include "api/replay/rdcstr.h"
#include "common/common.h"
#include "driver/dx/official/d3dcommon.h"
#include "dxbc_common.h"
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp b/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp
index 029ed5f4e..38796f881 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp
@@ -88,8 +88,7 @@ VarType OperationType(const DXBCBytecode::OpcodeType &op)
case OPCODE_SYNC:
case OPCODE_STORE_UAV_TYPED:
case OPCODE_STORE_RAW:
- case OPCODE_STORE_STRUCTURED:
- return VarType::Float;
+ case OPCODE_STORE_STRUCTURED: return VarType::Float;
// operations that can be either type, also just return float (fixed up later)
case OPCODE_SAMPLE:
@@ -272,26 +271,22 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_LT:
case OPCODE_GE:
case OPCODE_EQ:
- case OPCODE_NE:
- return true;
+ case OPCODE_NE: return true;
// can't generate denorms, or denorm inputs are implicitly rounded to 0, so don't bother
// flushing
case OPCODE_ITOF:
case OPCODE_UTOF:
case OPCODE_FTOI:
- case OPCODE_FTOU:
- return false;
+ case OPCODE_FTOU: return false;
// we have to flush this manually since the input is halves encoded in uints
case OPCODE_F16TOF32:
- case OPCODE_F32TOF16:
- return false;
+ case OPCODE_F32TOF16: return false;
// implementation defined if this should flush or not, we choose not.
case OPCODE_DTOF:
- case OPCODE_FTOD:
- return false;
+ case OPCODE_FTOD: return false;
// any I/O or data movement operation that does not manipulate the data, such as using the
// ld(22.4.6) instruction to access Resource data, or executing mov instruction or conditional
@@ -300,8 +295,7 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_MOV:
case OPCODE_MOVC:
case OPCODE_LD:
- case OPCODE_LD_MS:
- return false;
+ case OPCODE_LD_MS: return false;
// sample operations flush denorms
case OPCODE_SAMPLE:
@@ -313,18 +307,15 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_GATHER4:
case OPCODE_GATHER4_C:
case OPCODE_GATHER4_PO:
- case OPCODE_GATHER4_PO_C:
- return true;
+ case OPCODE_GATHER4_PO_C: return true;
// don't flush eval ops as some inputs may be uint
case OPCODE_EVAL_CENTROID:
case OPCODE_EVAL_SAMPLE_INDEX:
- case OPCODE_EVAL_SNAPPED:
- return false;
+ case OPCODE_EVAL_SNAPPED: return false;
// don't flush samplepos since an operand is scalar
- case OPCODE_SAMPLE_POS:
- return false;
+ case OPCODE_SAMPLE_POS: return false;
// unclear if these flush and it's unlikely denorms will come up, so conservatively flush
case OPCODE_SAMPLE_INFO:
@@ -334,8 +325,7 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_DERIV_RTX_FINE:
case OPCODE_DERIV_RTY:
case OPCODE_DERIV_RTY_COARSE:
- case OPCODE_DERIV_RTY_FINE:
- return true;
+ case OPCODE_DERIV_RTY_FINE: return true;
// operations that don't work on floats don't flush
case OPCODE_RESINFO:
@@ -361,8 +351,7 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_SYNC:
case OPCODE_STORE_UAV_TYPED:
case OPCODE_STORE_RAW:
- case OPCODE_STORE_STRUCTURED:
- return false;
+ case OPCODE_STORE_STRUCTURED: return false;
// integer operations don't flush
case OPCODE_AND:
@@ -428,8 +417,7 @@ bool OperationFlushing(const DXBCBytecode::OpcodeType &op)
case OPCODE_LD_RAW:
case OPCODE_LD_UAV_TYPED:
case OPCODE_LD_STRUCTURED:
- case OPCODE_DTOU:
- return false;
+ case OPCODE_DTOU: return false;
// doubles do not flush
case OPCODE_DADD:
@@ -910,7 +898,9 @@ ShaderVariable abs(const ShaderVariable &v, const VarType type)
r.value.s32v[i] = v.value.s32v[i] > 0 ? v.value.s32v[i] : -v.value.s32v[i];
break;
}
- case VarType::UInt: { break;
+ case VarType::UInt:
+ {
+ break;
}
case VarType::Float:
{
@@ -955,7 +945,9 @@ ShaderVariable neg(const ShaderVariable &v, const VarType type)
r.value.s32v[i] = -v.value.s32v[i];
break;
}
- case VarType::UInt: { break;
+ case VarType::UInt:
+ {
+ break;
}
case VarType::Float:
{
@@ -1986,8 +1978,8 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
switch(op.operation)
{
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // Math operations
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Math operations
case OPCODE_DADD:
case OPCODE_IADD:
@@ -2297,30 +2289,30 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
break;
case OPCODE_INEG: SetDst(state, op.operands[0], op, neg(srcOpers[0], optype)); break;
case OPCODE_IMIN:
- SetDst(
- state, op.operands[0], op,
- ShaderVariable(
- "", srcOpers[0].value.s32v[0] < srcOpers[1].value.s32v[0] ? srcOpers[0].value.s32v[0]
- : srcOpers[1].value.s32v[0],
- srcOpers[0].value.s32v[1] < srcOpers[1].value.s32v[1] ? srcOpers[0].value.s32v[1]
- : srcOpers[1].value.s32v[1],
- srcOpers[0].value.s32v[2] < srcOpers[1].value.s32v[2] ? srcOpers[0].value.s32v[2]
- : srcOpers[1].value.s32v[2],
- srcOpers[0].value.s32v[3] < srcOpers[1].value.s32v[3] ? srcOpers[0].value.s32v[3]
- : srcOpers[1].value.s32v[3]));
+ SetDst(state, op.operands[0], op,
+ ShaderVariable(
+ "",
+ srcOpers[0].value.s32v[0] < srcOpers[1].value.s32v[0] ? srcOpers[0].value.s32v[0]
+ : srcOpers[1].value.s32v[0],
+ srcOpers[0].value.s32v[1] < srcOpers[1].value.s32v[1] ? srcOpers[0].value.s32v[1]
+ : srcOpers[1].value.s32v[1],
+ srcOpers[0].value.s32v[2] < srcOpers[1].value.s32v[2] ? srcOpers[0].value.s32v[2]
+ : srcOpers[1].value.s32v[2],
+ srcOpers[0].value.s32v[3] < srcOpers[1].value.s32v[3] ? srcOpers[0].value.s32v[3]
+ : srcOpers[1].value.s32v[3]));
break;
case OPCODE_UMIN:
- SetDst(
- state, op.operands[0], op,
- ShaderVariable(
- "", srcOpers[0].value.u32v[0] < srcOpers[1].value.u32v[0] ? srcOpers[0].value.u32v[0]
- : srcOpers[1].value.u32v[0],
- srcOpers[0].value.u32v[1] < srcOpers[1].value.u32v[1] ? srcOpers[0].value.u32v[1]
- : srcOpers[1].value.u32v[1],
- srcOpers[0].value.u32v[2] < srcOpers[1].value.u32v[2] ? srcOpers[0].value.u32v[2]
- : srcOpers[1].value.u32v[2],
- srcOpers[0].value.u32v[3] < srcOpers[1].value.u32v[3] ? srcOpers[0].value.u32v[3]
- : srcOpers[1].value.u32v[3]));
+ SetDst(state, op.operands[0], op,
+ ShaderVariable(
+ "",
+ srcOpers[0].value.u32v[0] < srcOpers[1].value.u32v[0] ? srcOpers[0].value.u32v[0]
+ : srcOpers[1].value.u32v[0],
+ srcOpers[0].value.u32v[1] < srcOpers[1].value.u32v[1] ? srcOpers[0].value.u32v[1]
+ : srcOpers[1].value.u32v[1],
+ srcOpers[0].value.u32v[2] < srcOpers[1].value.u32v[2] ? srcOpers[0].value.u32v[2]
+ : srcOpers[1].value.u32v[2],
+ srcOpers[0].value.u32v[3] < srcOpers[1].value.u32v[3] ? srcOpers[0].value.u32v[3]
+ : srcOpers[1].value.u32v[3]));
break;
case OPCODE_DMIN:
{
@@ -2346,30 +2338,30 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
dxbc_min(srcOpers[0].value.f32v[3], srcOpers[1].value.f32v[3])));
break;
case OPCODE_UMAX:
- SetDst(
- state, op.operands[0], op,
- ShaderVariable(
- "", srcOpers[0].value.u32v[0] >= srcOpers[1].value.u32v[0] ? srcOpers[0].value.u32v[0]
- : srcOpers[1].value.u32v[0],
- srcOpers[0].value.u32v[1] >= srcOpers[1].value.u32v[1] ? srcOpers[0].value.u32v[1]
- : srcOpers[1].value.u32v[1],
- srcOpers[0].value.u32v[2] >= srcOpers[1].value.u32v[2] ? srcOpers[0].value.u32v[2]
- : srcOpers[1].value.u32v[2],
- srcOpers[0].value.u32v[3] >= srcOpers[1].value.u32v[3] ? srcOpers[0].value.u32v[3]
- : srcOpers[1].value.u32v[3]));
+ SetDst(state, op.operands[0], op,
+ ShaderVariable(
+ "",
+ srcOpers[0].value.u32v[0] >= srcOpers[1].value.u32v[0] ? srcOpers[0].value.u32v[0]
+ : srcOpers[1].value.u32v[0],
+ srcOpers[0].value.u32v[1] >= srcOpers[1].value.u32v[1] ? srcOpers[0].value.u32v[1]
+ : srcOpers[1].value.u32v[1],
+ srcOpers[0].value.u32v[2] >= srcOpers[1].value.u32v[2] ? srcOpers[0].value.u32v[2]
+ : srcOpers[1].value.u32v[2],
+ srcOpers[0].value.u32v[3] >= srcOpers[1].value.u32v[3] ? srcOpers[0].value.u32v[3]
+ : srcOpers[1].value.u32v[3]));
break;
case OPCODE_IMAX:
- SetDst(
- state, op.operands[0], op,
- ShaderVariable(
- "", srcOpers[0].value.s32v[0] >= srcOpers[1].value.s32v[0] ? srcOpers[0].value.s32v[0]
- : srcOpers[1].value.s32v[0],
- srcOpers[0].value.s32v[1] >= srcOpers[1].value.s32v[1] ? srcOpers[0].value.s32v[1]
- : srcOpers[1].value.s32v[1],
- srcOpers[0].value.s32v[2] >= srcOpers[1].value.s32v[2] ? srcOpers[0].value.s32v[2]
- : srcOpers[1].value.s32v[2],
- srcOpers[0].value.s32v[3] >= srcOpers[1].value.s32v[3] ? srcOpers[0].value.s32v[3]
- : srcOpers[1].value.s32v[3]));
+ SetDst(state, op.operands[0], op,
+ ShaderVariable(
+ "",
+ srcOpers[0].value.s32v[0] >= srcOpers[1].value.s32v[0] ? srcOpers[0].value.s32v[0]
+ : srcOpers[1].value.s32v[0],
+ srcOpers[0].value.s32v[1] >= srcOpers[1].value.s32v[1] ? srcOpers[0].value.s32v[1]
+ : srcOpers[1].value.s32v[1],
+ srcOpers[0].value.s32v[2] >= srcOpers[1].value.s32v[2] ? srcOpers[0].value.s32v[2]
+ : srcOpers[1].value.s32v[2],
+ srcOpers[0].value.s32v[3] >= srcOpers[1].value.s32v[3] ? srcOpers[0].value.s32v[3]
+ : srcOpers[1].value.s32v[3]));
break;
case OPCODE_DMAX:
{
@@ -2513,8 +2505,10 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
case OPCODE_ISHL:
{
uint32_t shifts[] = {
- srcOpers[1].value.u32v[0] & 0x1f, srcOpers[1].value.u32v[1] & 0x1f,
- srcOpers[1].value.u32v[2] & 0x1f, srcOpers[1].value.u32v[3] & 0x1f,
+ srcOpers[1].value.u32v[0] & 0x1f,
+ srcOpers[1].value.u32v[1] & 0x1f,
+ srcOpers[1].value.u32v[2] & 0x1f,
+ srcOpers[1].value.u32v[3] & 0x1f,
};
// if we were only given a single component, it's the form that shifts all components
@@ -2533,8 +2527,10 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
case OPCODE_USHR:
{
uint32_t shifts[] = {
- srcOpers[1].value.u32v[0] & 0x1f, srcOpers[1].value.u32v[1] & 0x1f,
- srcOpers[1].value.u32v[2] & 0x1f, srcOpers[1].value.u32v[3] & 0x1f,
+ srcOpers[1].value.u32v[0] & 0x1f,
+ srcOpers[1].value.u32v[1] & 0x1f,
+ srcOpers[1].value.u32v[2] & 0x1f,
+ srcOpers[1].value.u32v[3] & 0x1f,
};
// if we were only given a single component, it's the form that shifts all components
@@ -2553,8 +2549,10 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
case OPCODE_ISHR:
{
uint32_t shifts[] = {
- srcOpers[1].value.u32v[0] & 0x1f, srcOpers[1].value.u32v[1] & 0x1f,
- srcOpers[1].value.u32v[2] & 0x1f, srcOpers[1].value.u32v[3] & 0x1f,
+ srcOpers[1].value.u32v[0] & 0x1f,
+ srcOpers[1].value.u32v[1] & 0x1f,
+ srcOpers[1].value.u32v[2] & 0x1f,
+ srcOpers[1].value.u32v[3] & 0x1f,
};
// if we were only given a single component, it's the form that shifts all components
@@ -2597,9 +2595,9 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
~srcOpers[0].value.u32v[2], ~srcOpers[0].value.u32v[3]));
break;
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // transcendental functions with loose ULP requirements, so we pass them to the GPU to get
- // more accurate (well, LESS accurate but more representative) answers.
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // transcendental functions with loose ULP requirements, so we pass them to the GPU to get
+ // more accurate (well, LESS accurate but more representative) answers.
case OPCODE_RCP:
case OPCODE_RSQ:
@@ -2636,8 +2634,8 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
break;
}
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // Misc
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Misc
case OPCODE_NOP:
case OPCODE_CUSTOMDATA:
@@ -2794,8 +2792,8 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
break;
}
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // Comparison
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Comparison
case OPCODE_EQ:
SetDst(state, op.operands[0], op,
@@ -2931,8 +2929,8 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
(srcOpers[0].value.u32v[3] >= srcOpers[1].value.u32v[3] ? ~0u : 0u)));
break;
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // Atomic instructions
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Atomic instructions
case OPCODE_IMM_ATOMIC_ALLOC:
{
@@ -3625,7 +3623,10 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
else if(sampleCount == 2)
{
static const float pattern_2x[] = {
- _SMP(4.0f), _SMP(4.0f), _SMP(-4.0f), _SMP(-4.0f),
+ _SMP(4.0f),
+ _SMP(4.0f),
+ _SMP(-4.0f),
+ _SMP(-4.0f),
};
sample_pattern = &pattern_2x[0];
@@ -4111,8 +4112,8 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
break;
}
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- // Flow control
+ /////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Flow control
case OPCODE_SWITCH:
{
@@ -5198,11 +5199,11 @@ void GatherPSInputDataForInitialValues(const DXBC::DXBCContainer *dxbc,
psInputDefinition += ";\n";
- int firstElem = sig.regChannelMask & 0x1 ? 0 : sig.regChannelMask & 0x2
- ? 1
- : sig.regChannelMask & 0x4
- ? 2
- : sig.regChannelMask & 0x8 ? 3 : -1;
+ int firstElem = sig.regChannelMask & 0x1 ? 0
+ : sig.regChannelMask & 0x2 ? 1
+ : sig.regChannelMask & 0x4 ? 2
+ : sig.regChannelMask & 0x8 ? 3
+ : -1;
// arrays get added all at once (because in the struct data, they are contiguous even if
// in the input signature they're not).
@@ -5269,11 +5270,11 @@ ShaderDebugTrace *InterpretDebugger::BeginDebug(const DXBC::DXBCContainer *dxbcC
v.name = dxbc->GetDXBCByteCode()->GetRegisterName(DXBCBytecode::TYPE_INPUT, sig.regIndex);
v.rows = 1;
- v.columns = sig.regChannelMask & 0x8 ? 4 : sig.regChannelMask & 0x4
- ? 3
- : sig.regChannelMask & 0x2
- ? 2
- : sig.regChannelMask & 0x1 ? 1 : 0;
+ v.columns = sig.regChannelMask & 0x8 ? 4
+ : sig.regChannelMask & 0x4 ? 3
+ : sig.regChannelMask & 0x2 ? 2
+ : sig.regChannelMask & 0x1 ? 1
+ : 0;
v.type = sig.varType;
ShaderVariable &dst = state.inputs[sig.regIndex];
@@ -5373,11 +5374,11 @@ ShaderDebugTrace *InterpretDebugger::BeginDebug(const DXBC::DXBCContainer *dxbcC
v.name = dxbc->GetDXBCByteCode()->GetRegisterName(type, sig.regIndex);
v.rows = 1;
- v.columns = sig.regChannelMask & 0x8 ? 4 : sig.regChannelMask & 0x4
- ? 3
- : sig.regChannelMask & 0x2
- ? 2
- : sig.regChannelMask & 0x1 ? 1 : 0;
+ v.columns = sig.regChannelMask & 0x8 ? 4
+ : sig.regChannelMask & 0x4 ? 3
+ : sig.regChannelMask & 0x2 ? 2
+ : sig.regChannelMask & 0x1 ? 1
+ : 0;
v.type = sig.varType;
ShaderVariable &dst = state.variables[idx];
@@ -5485,12 +5486,20 @@ ShaderDebugTrace *InterpretDebugger::BeginDebug(const DXBC::DXBCContainer *dxbcC
ResList lists[2] = {
{
- VarType::ReadOnlyResource, DebugVariableType::ReadOnlyResource, mapping.readOnlyResources,
- refl.readOnlyResources, "tT", ret->readOnlyResources,
+ VarType::ReadOnlyResource,
+ DebugVariableType::ReadOnlyResource,
+ mapping.readOnlyResources,
+ refl.readOnlyResources,
+ "tT",
+ ret->readOnlyResources,
},
{
- VarType::ReadWriteResource, DebugVariableType::ReadWriteResource,
- mapping.readWriteResources, refl.readWriteResources, "uU", ret->readWriteResources,
+ VarType::ReadWriteResource,
+ DebugVariableType::ReadWriteResource,
+ mapping.readWriteResources,
+ refl.readWriteResources,
+ "uU",
+ ret->readWriteResources,
},
};
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h b/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h
index 7cd1f90a2..ba80fa8fd 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h
+++ b/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h
@@ -60,8 +60,7 @@ namespace DXBC
// Completely understood
struct SDBGHeader
{
- int32_t
- version; // Always 0x00000054 it seems. Probably a version number, might be some other ID
+ int32_t version; // Always 0x00000054 it seems. Probably a version number, might be some other ID
int32_t compilerSigOffset; // offset from asciiOffset at the end of this structure.
int32_t entryFuncOffset; // offset from asciiOffset at the end of this structure.
@@ -76,9 +75,8 @@ struct SDBGHeader
CountOffset inputRegisters; // This lists which bits of which inputs are used - e.g. the
// components in input
// signature elements and cbuffers.
- CountOffset
- symbolTable; // This is a symbol table definitely, also includes 'virtual' symbols to match
- // up ASM instructions to lines.
+ CountOffset symbolTable; // This is a symbol table definitely, also includes 'virtual' symbols
+ // to match up ASM instructions to lines.
CountOffset scopes; // These are scopes - like for structures/functions. Also Globals/Locals
// lists of variables
// in scope for reference in ASM instructions
diff --git a/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp b/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp
index 48277da88..ab9e5d4d0 100644
--- a/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp
+++ b/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp
@@ -32,7 +32,7 @@
#include "dxbc_spdb.h"
// uncomment the following to print (very verbose) debugging prints for SPDB processing
-//#define SPDBLOG(...) RDCDEBUG(__VA_ARGS__)
+// #define SPDBLOG(...) RDCDEBUG(__VA_ARGS__)
#ifndef SPDBLOG
#define SPDBLOG(...) (void)(__VA_ARGS__)
diff --git a/renderdoc/driver/shaders/dxil/dxil_bytecode_editor.cpp b/renderdoc/driver/shaders/dxil/dxil_bytecode_editor.cpp
index d3b879915..cef567a0c 100644
--- a/renderdoc/driver/shaders/dxil/dxil_bytecode_editor.cpp
+++ b/renderdoc/driver/shaders/dxil/dxil_bytecode_editor.cpp
@@ -719,16 +719,20 @@ bytebuf ProgramEditor::EncodeProgram()
writer.Record(LLVMBC::ModuleRecord::GLOBALVAR,
{
- typeIndex, uint64_t(((g.flags & GlobalFlags::IsConst) ? 1 : 0) | 0x2 |
- ((uint32_t)g.type->addrSpace << 2)),
- g.initialiser ? getValueID(g.initialiser) + 1 : 0, linkageValue,
- Log2Floor((uint32_t)g.align) + 1, uint64_t(g.section + 1),
+ typeIndex,
+ uint64_t(((g.flags & GlobalFlags::IsConst) ? 1 : 0) | 0x2 |
+ ((uint32_t)g.type->addrSpace << 2)),
+ g.initialiser ? getValueID(g.initialiser) + 1 : 0,
+ linkageValue,
+ Log2Floor((uint32_t)g.align) + 1,
+ uint64_t(g.section + 1),
// visibility
0U,
// TLS mode
0U,
// unnamed addr
- unnamedAddr, (g.flags & GlobalFlags::ExternallyInitialised) ? 1U : 0U,
+ unnamedAddr,
+ (g.flags & GlobalFlags::ExternallyInitialised) ? 1U : 0U,
// DLL storage class
0U,
// comdat
@@ -783,7 +787,8 @@ bytebuf ProgramEditor::EncodeProgram()
uint64_t typeIndex = getTypeID(a.type);
writer.Record(LLVMBC::ModuleRecord::ALIAS, {
- typeIndex, getValueID(a.val),
+ typeIndex,
+ getValueID(a.val),
// linkage
0U,
// visibility
@@ -1407,10 +1412,12 @@ bytebuf ProgramEditor::EncodeProgram()
// new debug location
const DebugLocation &loc = m_DebugLocations[inst->debugLoc];
- writer.Record(LLVMBC::FunctionRecord::DEBUG_LOC,
- {
- loc.line, loc.col, getMetaIDOrNull(loc.scope), getMetaIDOrNull(loc.inlinedAt),
- });
+ writer.Record(LLVMBC::FunctionRecord::DEBUG_LOC, {
+ loc.line,
+ loc.col,
+ getMetaIDOrNull(loc.scope),
+ getMetaIDOrNull(loc.inlinedAt),
+ });
debugLoc = inst->debugLoc;
}
diff --git a/renderdoc/driver/shaders/dxil/llvm_decoder.cpp b/renderdoc/driver/shaders/dxil/llvm_decoder.cpp
index b949764c9..9f7407ea2 100644
--- a/renderdoc/driver/shaders/dxil/llvm_decoder.cpp
+++ b/renderdoc/driver/shaders/dxil/llvm_decoder.cpp
@@ -423,13 +423,25 @@ TEST_CASE("Check LLVM bitreader", "[llvm]")
// values
byte bits[] = {
// dword 1
- 0x96, 0xf0, 0xA5, 0x3C,
+ 0x96,
+ 0xf0,
+ 0xA5,
+ 0x3C,
// padding dword
- 0x00, 0x00, 0x00, 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
// padding dword
- 0x00, 0x00, 0x00, 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
// padding dword
- 0x00, 0x00, 0x00, 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
};
LLVMBC::BitReader b(bits, sizeof(bits));
@@ -603,7 +615,8 @@ TEST_CASE("Check LLVM bitreader", "[llvm]")
};
uint64_t expected[] = {
- 0, 0,
+ 0,
+ 0,
// i_vbr2
0x0003,
// i_vbr3
@@ -787,12 +800,16 @@ TEST_CASE("Check LLVM bitreader", "[llvm]")
// first i_4 value
0x04,
// padding for alignment
- 0x00, 0x00, 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
// second two i_4 values
0xF5,
// i_24 value
- 0xCA, 0x99, 0x23,
+ 0xCA,
+ 0x99,
+ 0x23,
// no padding - already aligned
@@ -857,19 +874,30 @@ TEST_CASE("Check LLVM bitreader", "[llvm]")
// first vbr_6 length
0x06,
// padding for alignment
- 0x00, 0x00, 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
// blob data
- 0xF5, 0x00, 0xCA, 0x40, 0x99, 0x23,
+ 0xF5,
+ 0x00,
+ 0xCA,
+ 0x40,
+ 0x99,
+ 0x23,
// padding for trailing alignment
- 0x00, 0x00,
+ 0x00,
+ 0x00,
// i_20 dummy to get us to the point where two vbr_6 chunks would be aligned
// we choose a length of 70, which is 0b10 00110, then vbr_6 encoded it becomes
// 0b000010 100110 which is 0xA6, over 12 bits. That leaves 4 bits in the upper part of
// the last byte of the i_20, and the remaining 8 in the next byte
- 0x5B, 0xC2, 0x64, 0x0A,
+ 0x5B,
+ 0xC2,
+ 0x64,
+ 0x0A,
};
LLVMBC::BitReader b(bits, sizeof(bits));
diff --git a/renderdoc/driver/shaders/dxil/llvm_encoder.cpp b/renderdoc/driver/shaders/dxil/llvm_encoder.cpp
index 28b00e1d7..d922f1f12 100644
--- a/renderdoc/driver/shaders/dxil/llvm_encoder.cpp
+++ b/renderdoc/driver/shaders/dxil/llvm_encoder.cpp
@@ -99,19 +99,31 @@ enum class ValueSymtabAbbrev
AbbrevDefinition ValueSymtabAbbrevDefs[] = {
// Entry8
{
- AbbFixed(3), AbbVBR(8), AbbArray(), AbbFixed(8),
+ AbbFixed(3),
+ AbbVBR(8),
+ AbbArray(),
+ AbbFixed(8),
},
// Entry7
{
- AbbLiteral(ValueSymtabRecord::ENTRY), AbbVBR(8), AbbArray(), AbbFixed(7),
+ AbbLiteral(ValueSymtabRecord::ENTRY),
+ AbbVBR(8),
+ AbbArray(),
+ AbbFixed(7),
},
// Entry6
{
- AbbLiteral(ValueSymtabRecord::ENTRY), AbbVBR(8), AbbArray(), AbbChar6(),
+ AbbLiteral(ValueSymtabRecord::ENTRY),
+ AbbVBR(8),
+ AbbArray(),
+ AbbChar6(),
},
// BBEntry6
{
- AbbLiteral(ValueSymtabRecord::BBENTRY), AbbVBR(8), AbbArray(), AbbChar6(),
+ AbbLiteral(ValueSymtabRecord::BBENTRY),
+ AbbVBR(8),
+ AbbArray(),
+ AbbChar6(),
},
};
@@ -131,15 +143,20 @@ enum class ConstantsAbbrev
AbbrevDefinition ConstantsAbbrevDefs[] = {
// SetType
{
- AbbLiteral(ConstantsRecord::SETTYPE), AbbFixedTypes(),
+ AbbLiteral(ConstantsRecord::SETTYPE),
+ AbbFixedTypes(),
},
// Integer
{
- AbbLiteral(ConstantsRecord::INTEGER), AbbVBR(8),
+ AbbLiteral(ConstantsRecord::INTEGER),
+ AbbVBR(8),
},
// EvalCast
{
- AbbLiteral(ConstantsRecord::EVAL_CAST), AbbFixed(4), AbbFixedTypes(), AbbVBR(8),
+ AbbLiteral(ConstantsRecord::EVAL_CAST),
+ AbbFixed(4),
+ AbbFixedTypes(),
+ AbbVBR(8),
},
// Null
{
@@ -150,19 +167,27 @@ AbbrevDefinition ConstantsAbbrevDefs[] = {
AbbrevDefinition ConstantsGlobalAbbrevDefs[] = {
// Aggregate
{
- AbbLiteral(ConstantsRecord::AGGREGATE), AbbArray(), AbbFixedConstants(),
+ AbbLiteral(ConstantsRecord::AGGREGATE),
+ AbbArray(),
+ AbbFixedConstants(),
},
// String
{
- AbbLiteral(ConstantsRecord::STRING), AbbArray(), AbbFixed(8),
+ AbbLiteral(ConstantsRecord::STRING),
+ AbbArray(),
+ AbbFixed(8),
},
// CString7
{
- AbbLiteral(ConstantsRecord::CSTRING), AbbArray(), AbbFixed(7),
+ AbbLiteral(ConstantsRecord::CSTRING),
+ AbbArray(),
+ AbbFixed(7),
},
// CString6
{
- AbbLiteral(ConstantsRecord::CSTRING), AbbArray(), AbbChar6(),
+ AbbLiteral(ConstantsRecord::CSTRING),
+ AbbArray(),
+ AbbChar6(),
},
};
@@ -181,19 +206,33 @@ enum class FunctionAbbrev
AbbrevDefinition FunctionAbbrevDefs[] = {
// Load
{
- AbbLiteral(FunctionRecord::INST_LOAD), AbbVBR(6), AbbFixedTypes(), AbbVBR(4), AbbFixed(1),
+ AbbLiteral(FunctionRecord::INST_LOAD),
+ AbbVBR(6),
+ AbbFixedTypes(),
+ AbbVBR(4),
+ AbbFixed(1),
},
// BinOp
{
- AbbLiteral(FunctionRecord::INST_BINOP), AbbVBR(6), AbbVBR(6), AbbFixed(4),
+ AbbLiteral(FunctionRecord::INST_BINOP),
+ AbbVBR(6),
+ AbbVBR(6),
+ AbbFixed(4),
},
// BinOpFlags
{
- AbbLiteral(FunctionRecord::INST_BINOP), AbbVBR(6), AbbVBR(6), AbbFixed(4), AbbFixed(7),
+ AbbLiteral(FunctionRecord::INST_BINOP),
+ AbbVBR(6),
+ AbbVBR(6),
+ AbbFixed(4),
+ AbbFixed(7),
},
// Cast
{
- AbbLiteral(FunctionRecord::INST_CAST), AbbVBR(6), AbbFixedTypes(), AbbFixed(4),
+ AbbLiteral(FunctionRecord::INST_CAST),
+ AbbVBR(6),
+ AbbFixedTypes(),
+ AbbFixed(4),
},
// RetVoid
{
@@ -201,7 +240,8 @@ AbbrevDefinition FunctionAbbrevDefs[] = {
},
// RetValue
{
- AbbLiteral(FunctionRecord::INST_RET), AbbVBR(6),
+ AbbLiteral(FunctionRecord::INST_RET),
+ AbbVBR(6),
},
// Unreachable
{
@@ -209,7 +249,11 @@ AbbrevDefinition FunctionAbbrevDefs[] = {
},
// GEP
{
- AbbLiteral(FunctionRecord::INST_GEP), AbbFixed(1), AbbFixedTypes(), AbbArray(), AbbVBR(6),
+ AbbLiteral(FunctionRecord::INST_GEP),
+ AbbFixed(1),
+ AbbFixedTypes(),
+ AbbArray(),
+ AbbVBR(6),
},
};
@@ -226,27 +270,42 @@ enum class TypeAbbrev
AbbrevDefinition TypeAbbrevDefs[] = {
// Pointer
{
- AbbLiteral(TypeRecord::POINTER), AbbFixedTypes(), AbbLiteral(0),
+ AbbLiteral(TypeRecord::POINTER),
+ AbbFixedTypes(),
+ AbbLiteral(0),
},
// Function
{
- AbbLiteral(TypeRecord::FUNCTION), AbbFixed(1), AbbArray(), AbbFixedTypes(),
+ AbbLiteral(TypeRecord::FUNCTION),
+ AbbFixed(1),
+ AbbArray(),
+ AbbFixedTypes(),
},
// AnonStruct
{
- AbbLiteral(TypeRecord::STRUCT_ANON), AbbFixed(1), AbbArray(), AbbFixedTypes(),
+ AbbLiteral(TypeRecord::STRUCT_ANON),
+ AbbFixed(1),
+ AbbArray(),
+ AbbFixedTypes(),
},
// StructName
{
- AbbLiteral(TypeRecord::STRUCT_NAME), AbbArray(), AbbChar6(),
+ AbbLiteral(TypeRecord::STRUCT_NAME),
+ AbbArray(),
+ AbbChar6(),
},
// NamedStruct
{
- AbbLiteral(TypeRecord::STRUCT_NAMED), AbbFixed(1), AbbArray(), AbbFixedTypes(),
+ AbbLiteral(TypeRecord::STRUCT_NAMED),
+ AbbFixed(1),
+ AbbArray(),
+ AbbFixedTypes(),
},
// Array
{
- AbbLiteral(TypeRecord::ARRAY), AbbVBR(8), AbbFixedTypes(),
+ AbbLiteral(TypeRecord::ARRAY),
+ AbbVBR(8),
+ AbbFixedTypes(),
},
};
@@ -260,15 +319,24 @@ enum class MetadataAbbrev
AbbrevDefinition MetadataAbbrevDefs[] = {
// String
{
- AbbLiteral(MetaDataRecord::STRING_OLD), AbbArray(), AbbFixed(8),
+ AbbLiteral(MetaDataRecord::STRING_OLD),
+ AbbArray(),
+ AbbFixed(8),
},
// DebugLocation
{
- AbbLiteral(MetaDataRecord::LOCATION), AbbFixed(1), AbbVBR(6), AbbVBR(8), AbbVBR(6), AbbVBR(6),
+ AbbLiteral(MetaDataRecord::LOCATION),
+ AbbFixed(1),
+ AbbVBR(6),
+ AbbVBR(8),
+ AbbVBR(6),
+ AbbVBR(6),
},
// Name
{
- AbbLiteral(MetaDataRecord::NAME), AbbArray(), AbbFixed(8),
+ AbbLiteral(MetaDataRecord::NAME),
+ AbbArray(),
+ AbbFixed(8),
},
};
@@ -576,9 +644,7 @@ void BitcodeWriter::AutoRecord(uint32_t record, bool param, uint64_t val)
// these abbrevs are available in all constants blocks
case ConstantsRecord::SETTYPE: idx = (uint32_t)ConstantsAbbrev::SetType; break;
case ConstantsRecord::INTEGER: idx = (uint32_t)ConstantsAbbrev::Integer; break;
- case ConstantsRecord::EVAL_CAST:
- idx = (uint32_t)ConstantsAbbrev::EvalCast;
- break;
+ case ConstantsRecord::EVAL_CAST: idx = (uint32_t)ConstantsAbbrev::EvalCast; break;
// LLVM doesn't seem to use this abbrev?
// case ConstantsRecord::CONST_NULL: idx = (uint32_t)ConstantsAbbrev::Null; break;
default: break;
diff --git a/renderdoc/driver/shaders/spirv/spirv_debug.cpp b/renderdoc/driver/shaders/spirv/spirv_debug.cpp
index 2412a81b2..acf7d811a 100644
--- a/renderdoc/driver/shaders/spirv/spirv_debug.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_debug.cpp
@@ -819,11 +819,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Composite/vector opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Composite/vector opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::CompositeExtract:
{
@@ -1072,11 +1072,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Conversion opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Conversion opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::ConvertFToS:
case Op::ConvertFToU:
@@ -1313,11 +1313,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Extended instruction set handling
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Extended instruction set handling
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::ExtInst:
{
@@ -1360,11 +1360,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Comparison opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Comparison opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::LogicalEqual:
case Op::LogicalNotEqual:
@@ -1735,11 +1735,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Bitwise/logical opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Bitwise/logical opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::BitCount:
{
@@ -1964,11 +1964,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Mathematical opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Mathematical opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::FMul:
case Op::FDiv:
@@ -2253,7 +2253,7 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
{
for(uint8_t c = 0; c < a.columns; c++)
{
-// if b <= a we don't need to borrow, otherwise set the borrow bit
+ // if b <= a we don't need to borrow, otherwise set the borrow bit
#undef _IMPL
#define _IMPL(I, S, U) \
@@ -2508,11 +2508,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Image opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Image opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::SampledImage:
{
@@ -2826,11 +2826,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Block flow control opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Block flow control opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::MemoryBarrier:
case Op::ControlBarrier:
@@ -2908,11 +2908,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Misc opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Misc opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::CopyObject:
case Op::CopyLogical:
@@ -2961,11 +2961,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Function flow control opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Function flow control opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::FunctionCall:
{
@@ -3050,11 +3050,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Atomic opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Atomic opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::ImageTexelPointer:
{
@@ -3426,11 +3426,11 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray
break;
}
- //////////////////////////////////////////////////////////////////////////////
- //
- // Misc. opcodes
- //
- //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // Misc. opcodes
+ //
+ //////////////////////////////////////////////////////////////////////////////
case Op::Undef:
{
diff --git a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
index 038a720da..0cb92bf9f 100644
--- a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
@@ -924,9 +924,9 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
// fill the interface variable
auto fillInputCallback = [this, isInput, addSource, ret, &sigNames, &rawName, &sourceName](
- ShaderVariable &var, const Decorations &curDecorations, const DataType &type,
- uint64_t location, const rdcstr &accessSuffix) {
-
+ ShaderVariable &var, const Decorations &curDecorations,
+ const DataType &type, uint64_t location,
+ const rdcstr &accessSuffix) {
if(!var.members.empty())
return;
@@ -1095,9 +1095,8 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
bindpoint.bind = (int32_t)bind;
auto cbufferCallback = [this, &bindpoint](
- ShaderVariable &var, const Decorations &curDecorations, const DataType &type,
- uint64_t offset, const rdcstr &) {
-
+ ShaderVariable &var, const Decorations &curDecorations,
+ const DataType &type, uint64_t offset, const rdcstr &) {
if(!var.members.empty())
return;
@@ -2303,7 +2302,6 @@ ShaderVariable Debugger::ReadFromPointer(const ShaderVariable &ptr) const
auto readCallback = [this, bind](ShaderVariable &var, const Decorations &dec,
const DataType &type, uint64_t offset, const rdcstr &) {
-
// ignore any callbacks we get on the way up for structs/arrays, we don't need it we only read
// or write at primitive level
if(!var.members.empty())
@@ -2482,8 +2480,8 @@ void Debugger::WriteThroughPointer(ShaderVariable &ptr, const ShaderVariable &va
bool rowMajor = checkPointerFlags(ptr, PointerFlags::RowMajorMatrix);
auto writeCallback = [this, bind, matrixStride, rowMajor](
- const ShaderVariable &var, const Decorations &, const DataType &type, uint64_t offset,
- const rdcstr &) {
+ const ShaderVariable &var, const Decorations &, const DataType &type,
+ uint64_t offset, const rdcstr &) {
if(!var.members.empty())
return;
@@ -3288,7 +3286,9 @@ void Debugger::RegisterOp(Iter it)
rdcstr name = strings[dbg.arg(0)];
uint32_t tag = EvaluateConstant(dbg.arg(1), {}).value.u32v[0];
const rdcstr tagString[3] = {
- "class ", "struct ", "union ",
+ "class ",
+ "struct ",
+ "union ",
};
// don't use arg 2 source - assume the parent is in the same file so it's redundant
@@ -3394,7 +3394,8 @@ void Debugger::RegisterOp(Iter it)
case ShaderDbg::LocalVariable:
{
m_DebugInfo.locals[dbg.result] = {
- strings[dbg.arg(0)], &m_DebugInfo.scopes[dbg.arg(5)],
+ strings[dbg.arg(0)],
+ &m_DebugInfo.scopes[dbg.arg(5)],
&m_DebugInfo.types[dbg.arg(1)],
};
diff --git a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
index 385950161..50c62f842 100644
--- a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
@@ -336,8 +336,7 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
case Op::String:
case Op::Name:
case Op::MemberName:
- case Op::ExtInstImport:
- continue;
+ case Op::ExtInstImport: continue;
// ignore decorations too, we already have these cached
case Op::Decorate:
@@ -347,8 +346,7 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
case Op::MemberDecorateString:
case Op::DecorationGroup:
case Op::GroupDecorate:
- case Op::GroupMemberDecorate:
- continue;
+ case Op::GroupMemberDecorate: continue;
// suppress almost all types
case Op::TypeVoid:
@@ -447,9 +445,7 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
case VarType::UShort: ret += ToStr(value.u16v[0]); break;
case VarType::UByte: ret += ToStr(value.u8v[0]); break;
case VarType::SLong: ret += ToStr(value.s64v[0]); break;
- case VarType::ULong:
- ret += ToStr(value.u64v[0]);
- break;
+ case VarType::ULong: ret += ToStr(value.u64v[0]); break;
// none of these types are expected, either because they're opaque or (for struct)
// because ConstantComposite should have been used
case VarType::Enum:
@@ -1212,9 +1208,9 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
break;
}
- ////////////////////////////////////////////////////////////////////////////////////////
- // pretty printing unary instructions
- ////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////
+ // pretty printing unary instructions
+ ////////////////////////////////////////////////////////////////////////////////////////
case Op::SNegate:
case Op::FNegate:
@@ -1242,9 +1238,9 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
break;
}
- ////////////////////////////////////////////////////////////////////////////////////////
- // pretty printing binary instructions
- ////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////
+ // pretty printing binary instructions
+ ////////////////////////////////////////////////////////////////////////////////////////
case Op::IAdd:
case Op::FAdd:
diff --git a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
index 907bcd7ad..dbe5913c2 100644
--- a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
@@ -606,7 +606,8 @@ void Reflector::RegisterOp(Iter it)
{
debugSources[dbg.result] = sources.size();
sources.push_back({
- SourceLanguage::Unknown, strings[dbg.arg(0)],
+ SourceLanguage::Unknown,
+ strings[dbg.arg(0)],
dbg.params.size() > 1 ? strings[dbg.arg(1)] : rdcstr(),
});
}
@@ -2148,7 +2149,6 @@ TEST_CASE("Validate SPIR-V reflection", "[spirv][reflection]")
ShaderType type = ShaderType::Vulkan;
auto compiler = [&type](ShaderStage stage, const rdcstr &source, const rdcstr &entryPoint,
ShaderReflection &refl, ShaderBindpointMapping &mapping) {
-
rdcspv::Init();
RenderDoc::Inst().RegisterShutdownFunction(&rdcspv::Shutdown);
diff --git a/renderdoc/driver/vulkan/imgrefs_tests.cpp b/renderdoc/driver/vulkan/imgrefs_tests.cpp
index 5401d40c8..ec47ead54 100644
--- a/renderdoc/driver/vulkan/imgrefs_tests.cpp
+++ b/renderdoc/driver/vulkan/imgrefs_tests.cpp
@@ -151,13 +151,29 @@ TEST_CASE("Test ImgRefs type", "[imgrefs]")
imgRefs.Update(range1, eFrameRef_PartialWrite);
rdcarray expected = {
// VK_IMAGE_ASPECT_DEPTH_BIT
- eFrameRef_None, eFrameRef_None, eFrameRef_None, eFrameRef_None, eFrameRef_None,
- eFrameRef_PartialWrite, eFrameRef_PartialWrite, eFrameRef_None, eFrameRef_None,
- eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_None,
// VK_IMAGE_ASPECT_STENCIL_BIT
- eFrameRef_Read, eFrameRef_Read, eFrameRef_Read, eFrameRef_Read, eFrameRef_Read,
- eFrameRef_ReadBeforeWrite, eFrameRef_ReadBeforeWrite, eFrameRef_Read, eFrameRef_Read,
- eFrameRef_Read, eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_Read,
};
CHECK(imgRefs.rangeRefs == expected);
}
@@ -176,36 +192,89 @@ TEST_CASE("Test ImgRefs type", "[imgrefs]")
imgRefs.Update(range1, eFrameRef_PartialWrite);
rdcarray expected = {
// (Depth, level 0)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Depth, level 1)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Depth, level 2)
- eFrameRef_PartialWrite, eFrameRef_ReadBeforeWrite, eFrameRef_ReadBeforeWrite,
- eFrameRef_PartialWrite, eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
// (Depth, level 3)
- eFrameRef_PartialWrite, eFrameRef_ReadBeforeWrite, eFrameRef_ReadBeforeWrite,
- eFrameRef_PartialWrite, eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
// (Depth, level 4)
- eFrameRef_PartialWrite, eFrameRef_ReadBeforeWrite, eFrameRef_ReadBeforeWrite,
- eFrameRef_PartialWrite, eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_ReadBeforeWrite,
+ eFrameRef_PartialWrite,
+ eFrameRef_PartialWrite,
// (Depth, level 5)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Depth, level 6)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 0)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 1)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 2)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 3)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 4)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 5)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
// (Stencil, level 6)
- eFrameRef_None, eFrameRef_Read, eFrameRef_Read, eFrameRef_None, eFrameRef_None,
+ eFrameRef_None,
+ eFrameRef_Read,
+ eFrameRef_Read,
+ eFrameRef_None,
+ eFrameRef_None,
};
CHECK(imgRefs.rangeRefs == expected);
diff --git a/renderdoc/driver/vulkan/vk_common.h b/renderdoc/driver/vulkan/vk_common.h
index 16021d3cf..ee32cbbe4 100644
--- a/renderdoc/driver/vulkan/vk_common.h
+++ b/renderdoc/driver/vulkan/vk_common.h
@@ -41,15 +41,28 @@
#else
// make handles typed even on 32-bit, by relying on C++
-#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(obj) \
- struct obj \
- { \
- obj() : handle(0) {} \
- obj(uint64_t x) : handle(x) {} \
- bool operator==(const obj &other) const { return handle == other.handle; } \
- bool operator<(const obj &other) const { return handle < other.handle; } \
- bool operator!=(const obj &other) const { return handle != other.handle; } \
- uint64_t handle; \
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(obj) \
+ struct obj \
+ { \
+ obj() : handle(0) \
+ { \
+ } \
+ obj(uint64_t x) : handle(x) \
+ { \
+ } \
+ bool operator==(const obj &other) const \
+ { \
+ return handle == other.handle; \
+ } \
+ bool operator<(const obj &other) const \
+ { \
+ return handle < other.handle; \
+ } \
+ bool operator!=(const obj &other) const \
+ { \
+ return handle != other.handle; \
+ } \
+ uint64_t handle; \
};
#define VK_NON_DISPATCHABLE_WRAPPER_STRUCT
@@ -511,45 +524,43 @@ FrameRefType GetRefType(DescriptorSlotType descType);
constexpr VkDescriptorType convert(DescriptorSlotType type)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return type == DescriptorSlotType::Unwritten ? VK_DESCRIPTOR_TYPE_MAX_ENUM
- : type == DescriptorSlotType::Sampler ? VK_DESCRIPTOR_TYPE_SAMPLER
- : type == DescriptorSlotType::CombinedImageSampler ? VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
- : type == DescriptorSlotType::SampledImage ? VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
- : type == DescriptorSlotType::StorageImage ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
- : type == DescriptorSlotType::UniformTexelBuffer ? VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
- : type == DescriptorSlotType::StorageTexelBuffer ? VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
- : type == DescriptorSlotType::UniformBuffer ? VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
- : type == DescriptorSlotType::StorageBuffer ? VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
- : type == DescriptorSlotType::UniformBufferDynamic ? VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
- : type == DescriptorSlotType::StorageBufferDynamic ? VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
- : type == DescriptorSlotType::InputAttachment ? VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
- : type == DescriptorSlotType::InlineBlock ? VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
- : VK_DESCRIPTOR_TYPE_MAX_ENUM;
- // clang-format on
+ return type == DescriptorSlotType::Unwritten ? VK_DESCRIPTOR_TYPE_MAX_ENUM
+ : type == DescriptorSlotType::Sampler ? VK_DESCRIPTOR_TYPE_SAMPLER
+ : type == DescriptorSlotType::CombinedImageSampler
+ ? VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
+ : type == DescriptorSlotType::SampledImage ? VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
+ : type == DescriptorSlotType::StorageImage ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
+ : type == DescriptorSlotType::UniformTexelBuffer ? VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
+ : type == DescriptorSlotType::StorageTexelBuffer ? VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
+ : type == DescriptorSlotType::UniformBuffer ? VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
+ : type == DescriptorSlotType::StorageBuffer ? VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
+ : type == DescriptorSlotType::UniformBufferDynamic
+ ? VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
+ : type == DescriptorSlotType::StorageBufferDynamic
+ ? VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
+ : type == DescriptorSlotType::InputAttachment ? VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
+ : type == DescriptorSlotType::InlineBlock ? VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
+ : VK_DESCRIPTOR_TYPE_MAX_ENUM;
}
constexpr DescriptorSlotType convert(VkDescriptorType type)
{
- // temporarily disable clang-format to make this more readable.
- // Ideally we'd use a simple switch() but VS2015 doesn't support that :(.
- // clang-format off
- return type == VK_DESCRIPTOR_TYPE_SAMPLER ? DescriptorSlotType::Sampler
- : type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER ? DescriptorSlotType::CombinedImageSampler
- : type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE ? DescriptorSlotType::SampledImage
- : type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE ? DescriptorSlotType::StorageImage
- : type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER ? DescriptorSlotType::UniformTexelBuffer
- : type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER ? DescriptorSlotType::StorageTexelBuffer
- : type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ? DescriptorSlotType::UniformBuffer
- : type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ? DescriptorSlotType::StorageBuffer
- : type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC ? DescriptorSlotType::UniformBufferDynamic
- : type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC ? DescriptorSlotType::StorageBufferDynamic
- : type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT ? DescriptorSlotType::InputAttachment
- : type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK ? DescriptorSlotType::InlineBlock
- : DescriptorSlotType::Unwritten;
- // clang-format on
+ return type == VK_DESCRIPTOR_TYPE_SAMPLER ? DescriptorSlotType::Sampler
+ : type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
+ ? DescriptorSlotType::CombinedImageSampler
+ : type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE ? DescriptorSlotType::SampledImage
+ : type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE ? DescriptorSlotType::StorageImage
+ : type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER ? DescriptorSlotType::UniformTexelBuffer
+ : type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER ? DescriptorSlotType::StorageTexelBuffer
+ : type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ? DescriptorSlotType::UniformBuffer
+ : type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ? DescriptorSlotType::StorageBuffer
+ : type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
+ ? DescriptorSlotType::UniformBufferDynamic
+ : type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
+ ? DescriptorSlotType::StorageBufferDynamic
+ : type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT ? DescriptorSlotType::InputAttachment
+ : type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK ? DescriptorSlotType::InlineBlock
+ : DescriptorSlotType::Unwritten;
}
enum class DescriptorSlotImageLayout : EnumBaseType
diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp
index f7a8f9009..bab984b44 100644
--- a/renderdoc/driver/vulkan/vk_core.cpp
+++ b/renderdoc/driver/vulkan/vk_core.cpp
@@ -825,55 +825,68 @@ bool operator<(const VkExtensionProperties &a, const VkExtensionProperties &b)
// This list must be kept sorted according to the above sort operator!
static const VkExtensionProperties supportedExtensions[] = {
{
- VK_AMD_BUFFER_MARKER_EXTENSION_NAME, VK_AMD_BUFFER_MARKER_SPEC_VERSION,
+ VK_AMD_BUFFER_MARKER_EXTENSION_NAME,
+ VK_AMD_BUFFER_MARKER_SPEC_VERSION,
},
{
- VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME, VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION,
+ VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME,
+ VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION,
},
{
- VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME, VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION,
+ VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME,
+ VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION,
},
{
- VK_AMD_GCN_SHADER_EXTENSION_NAME, VK_AMD_GCN_SHADER_SPEC_VERSION,
+ VK_AMD_GCN_SHADER_EXTENSION_NAME,
+ VK_AMD_GCN_SHADER_SPEC_VERSION,
},
{
- VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME, VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION,
+ VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME,
+ VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION,
},
{
- VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME, VK_AMD_GPU_SHADER_INT16_SPEC_VERSION,
+ VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME,
+ VK_AMD_GPU_SHADER_INT16_SPEC_VERSION,
},
{
VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME,
VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION,
},
{
- VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME, VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION,
+ VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME,
+ VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION,
},
{
- VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME, VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION,
+ VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME,
+ VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION,
},
{
- VK_AMD_SHADER_BALLOT_EXTENSION_NAME, VK_AMD_SHADER_BALLOT_SPEC_VERSION,
+ VK_AMD_SHADER_BALLOT_EXTENSION_NAME,
+ VK_AMD_SHADER_BALLOT_SPEC_VERSION,
},
{
- VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME, VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION,
+ VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME,
+ VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION,
},
{
VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME,
VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION,
},
{
- VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION,
+ VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME,
+ VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION,
},
{
VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME,
VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION,
},
{
- VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME, VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION,
+ VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME,
+ VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION,
},
{
- VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME, VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION,
+ VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME,
+ VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION,
},
#ifdef VK_ANDROID_external_memory_android_hardware_buffer
{
@@ -882,18 +895,22 @@ static const VkExtensionProperties supportedExtensions[] = {
},
#endif
{
- VK_EXT_4444_FORMATS_EXTENSION_NAME, VK_EXT_4444_FORMATS_SPEC_VERSION,
+ VK_EXT_4444_FORMATS_EXTENSION_NAME,
+ VK_EXT_4444_FORMATS_SPEC_VERSION,
},
{
- VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION,
+ VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME,
+ VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION,
},
#ifdef VK_EXT_acquire_xlib_display
{
- VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION,
+ VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME,
+ VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION,
},
#endif
{
- VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME, VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION,
+ VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME,
+ VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION,
},
{
VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME,
@@ -904,137 +921,179 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION,
},
{
- VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME, VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION,
+ VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME,
+ VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION,
},
{
- VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME, VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION,
+ VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
+ VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION,
},
{
- VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION,
+ VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME,
+ VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION,
},
{
- VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME, VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION,
+ VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME,
+ VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION,
},
{
- VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION,
+ VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
+ VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION,
},
{
VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME,
VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION,
},
{
- VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION,
+ VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME,
+ VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION,
},
{
- VK_EXT_DEBUG_MARKER_EXTENSION_NAME, VK_EXT_DEBUG_MARKER_SPEC_VERSION,
+ VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
+ VK_EXT_DEBUG_MARKER_SPEC_VERSION,
},
{
- VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION,
+ VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
+ VK_EXT_DEBUG_REPORT_SPEC_VERSION,
},
{
- VK_EXT_DEBUG_UTILS_EXTENSION_NAME, VK_EXT_DEBUG_UTILS_SPEC_VERSION,
+ VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
+ VK_EXT_DEBUG_UTILS_SPEC_VERSION,
},
{
- VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME, VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION,
+ VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME,
+ VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION,
},
{
- VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME, VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION,
+ VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME,
+ VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION,
},
{
- VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION,
+ VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME,
+ VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION,
},
{
- VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION,
+ VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME,
+ VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION,
},
{
- VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION,
+ VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
+ VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION,
},
{
- VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION,
+ VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME,
+ VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION,
},
{
- VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION,
+ VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME,
+ VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION,
},
{
- VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME, VK_EXT_DISPLAY_CONTROL_SPEC_VERSION,
+ VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME,
+ VK_EXT_DISPLAY_CONTROL_SPEC_VERSION,
},
{
- VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME, VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION,
+ VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME,
+ VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION,
},
{
- VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION,
+ VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
+ VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION,
},
{
- VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME, VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION,
+ VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME,
+ VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION,
},
{
- VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION,
+ VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME,
+ VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION,
},
{
- VK_EXT_FILTER_CUBIC_EXTENSION_NAME, VK_EXT_FILTER_CUBIC_SPEC_VERSION,
+ VK_EXT_FILTER_CUBIC_EXTENSION_NAME,
+ VK_EXT_FILTER_CUBIC_SPEC_VERSION,
},
{
- VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME, VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION,
+ VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME,
+ VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION,
},
{
- VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME, VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION,
+ VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME,
+ VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION,
},
{
- VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME, VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION,
+ VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME,
+ VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION,
},
#ifdef VK_EXT_full_screen_exclusive
{
- VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION,
+ VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME,
+ VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION,
},
#endif
{
- VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME, VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION,
+ VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME,
+ VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION,
},
{
- VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME, VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION,
+ VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME,
+ VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION,
},
{
- VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION,
+ VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME,
+ VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION,
},
{
- VK_EXT_HDR_METADATA_EXTENSION_NAME, VK_EXT_HDR_METADATA_SPEC_VERSION,
+ VK_EXT_HDR_METADATA_EXTENSION_NAME,
+ VK_EXT_HDR_METADATA_SPEC_VERSION,
},
{
- VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_SPEC_VERSION,
+ VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME,
+ VK_EXT_HEADLESS_SURFACE_SPEC_VERSION,
},
{
- VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, VK_EXT_HOST_QUERY_RESET_SPEC_VERSION,
+ VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
+ VK_EXT_HOST_QUERY_RESET_SPEC_VERSION,
},
{
- VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME, VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION,
+ VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME,
+ VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION,
},
{
- VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME, VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION,
+ VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME,
+ VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION,
},
{
- VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME, VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION,
+ VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME,
+ VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION,
},
{
- VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME, VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION,
+ VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME,
+ VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION,
},
{
- VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION,
+ VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME,
+ VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION,
},
{
- VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME, VK_EXT_LINE_RASTERIZATION_SPEC_VERSION,
+ VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME,
+ VK_EXT_LINE_RASTERIZATION_SPEC_VERSION,
},
{
- VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME, VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION,
+ VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME,
+ VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION,
},
{
- VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, VK_EXT_MEMORY_BUDGET_SPEC_VERSION,
+ VK_EXT_MEMORY_BUDGET_EXTENSION_NAME,
+ VK_EXT_MEMORY_BUDGET_SPEC_VERSION,
},
{
- VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, VK_EXT_MEMORY_PRIORITY_SPEC_VERSION,
+ VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME,
+ VK_EXT_MEMORY_PRIORITY_SPEC_VERSION,
},
#ifdef VK_EXT_metal_surface
{
- VK_EXT_METAL_SURFACE_EXTENSION_NAME, VK_EXT_METAL_SURFACE_SPEC_VERSION,
+ VK_EXT_METAL_SURFACE_EXTENSION_NAME,
+ VK_EXT_METAL_SURFACE_SPEC_VERSION,
},
#endif
{
@@ -1042,17 +1101,20 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION,
},
{
- VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME, VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION,
+ VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME,
+ VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION,
},
{
- VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME, VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION,
+ VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME,
+ VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION,
},
{
VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME,
VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION,
},
{
- VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, VK_EXT_PCI_BUS_INFO_SPEC_VERSION,
+ VK_EXT_PCI_BUS_INFO_EXTENSION_NAME,
+ VK_EXT_PCI_BUS_INFO_SPEC_VERSION,
},
{
VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME,
@@ -1063,7 +1125,8 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION,
},
{
- VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME, VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION,
+ VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME,
+ VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION,
},
{
VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME,
@@ -1074,254 +1137,320 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION,
},
{
- VK_EXT_PRIVATE_DATA_EXTENSION_NAME, VK_EXT_PRIVATE_DATA_SPEC_VERSION,
+ VK_EXT_PRIVATE_DATA_EXTENSION_NAME,
+ VK_EXT_PRIVATE_DATA_SPEC_VERSION,
},
{
- VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME, VK_EXT_PROVOKING_VERTEX_SPEC_VERSION,
+ VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME,
+ VK_EXT_PROVOKING_VERTEX_SPEC_VERSION,
},
{
- VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION,
+ VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME,
+ VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION,
},
{
VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME,
VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION,
},
{
- VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME, VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION,
+ VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME,
+ VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION,
},
{
- VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, VK_EXT_ROBUSTNESS_2_SPEC_VERSION,
+ VK_EXT_ROBUSTNESS_2_EXTENSION_NAME,
+ VK_EXT_ROBUSTNESS_2_SPEC_VERSION,
},
{
- VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION,
+ VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME,
+ VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION,
},
{
- VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION,
+ VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME,
+ VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION,
},
{
- VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME, VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION,
+ VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME,
+ VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION,
},
{
- VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME, VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION,
+ VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME,
+ VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION,
},
{
- VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME, VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION,
+ VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME,
+ VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION,
},
{
- VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME, VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION,
+ VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME,
+ VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION,
},
{
VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME,
VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION,
},
{
- VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME, VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION,
+ VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME,
+ VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION,
},
{
- VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION,
+ VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME,
+ VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION,
},
{
- VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION,
+ VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME,
+ VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION,
},
{
- VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION,
+ VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME,
+ VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION,
},
{
VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME,
VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION,
},
{
- VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME, VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION,
+ VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME,
+ VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION,
},
{
- VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME, VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION,
+ VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME,
+ VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION,
},
{
- VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME, VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION,
+ VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
+ VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION,
},
{
- VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME, VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION,
+ VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME,
+ VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION,
},
{
- VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME, VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION,
+ VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME,
+ VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION,
},
{
- VK_EXT_TOOLING_INFO_EXTENSION_NAME, VK_EXT_TOOLING_INFO_SPEC_VERSION,
+ VK_EXT_TOOLING_INFO_EXTENSION_NAME,
+ VK_EXT_TOOLING_INFO_SPEC_VERSION,
},
{
- VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION,
+ VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME,
+ VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION,
},
{
- VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, VK_EXT_VALIDATION_CACHE_SPEC_VERSION,
+ VK_EXT_VALIDATION_CACHE_EXTENSION_NAME,
+ VK_EXT_VALIDATION_CACHE_SPEC_VERSION,
},
{
- VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME, VK_EXT_VALIDATION_FEATURES_SPEC_VERSION,
+ VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME,
+ VK_EXT_VALIDATION_FEATURES_SPEC_VERSION,
},
{
- VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME, VK_EXT_VALIDATION_FLAGS_SPEC_VERSION,
+ VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME,
+ VK_EXT_VALIDATION_FLAGS_SPEC_VERSION,
},
{
- VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION,
+ VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME,
+ VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION,
},
{
VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME,
VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION,
},
{
- VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME, VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION,
+ VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME,
+ VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION,
},
{
- VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME, VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION,
+ VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME,
+ VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION,
},
#ifdef VK_GGP_frame_token
{
- VK_GGP_FRAME_TOKEN_EXTENSION_NAME, VK_GGP_FRAME_TOKEN_SPEC_VERSION,
+ VK_GGP_FRAME_TOKEN_EXTENSION_NAME,
+ VK_GGP_FRAME_TOKEN_SPEC_VERSION,
},
#endif
#ifdef VK_GGP_stream_descriptor_surface
{
- VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME, VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION,
+ VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME,
+ VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION,
},
#endif
{
- VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME, VK_GOOGLE_DECORATE_STRING_SPEC_VERSION,
+ VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME,
+ VK_GOOGLE_DECORATE_STRING_SPEC_VERSION,
},
{
- VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION,
+ VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME,
+ VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION,
},
{
- VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME, VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION,
+ VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME,
+ VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION,
},
{
- VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME, VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION,
+ VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME,
+ VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION,
},
{
- VK_GOOGLE_USER_TYPE_EXTENSION_NAME, VK_GOOGLE_USER_TYPE_SPEC_VERSION,
+ VK_GOOGLE_USER_TYPE_EXTENSION_NAME,
+ VK_GOOGLE_USER_TYPE_SPEC_VERSION,
},
{
- VK_IMG_FILTER_CUBIC_EXTENSION_NAME, VK_IMG_FILTER_CUBIC_SPEC_VERSION,
+ VK_IMG_FILTER_CUBIC_EXTENSION_NAME,
+ VK_IMG_FILTER_CUBIC_SPEC_VERSION,
},
{
- VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, VK_IMG_FORMAT_PVRTC_SPEC_VERSION,
+ VK_IMG_FORMAT_PVRTC_EXTENSION_NAME,
+ VK_IMG_FORMAT_PVRTC_SPEC_VERSION,
},
{
- VK_KHR_16BIT_STORAGE_EXTENSION_NAME, VK_KHR_16BIT_STORAGE_SPEC_VERSION,
+ VK_KHR_16BIT_STORAGE_EXTENSION_NAME,
+ VK_KHR_16BIT_STORAGE_SPEC_VERSION,
},
{
- VK_KHR_8BIT_STORAGE_EXTENSION_NAME, VK_KHR_8BIT_STORAGE_SPEC_VERSION,
+ VK_KHR_8BIT_STORAGE_EXTENSION_NAME,
+ VK_KHR_8BIT_STORAGE_SPEC_VERSION,
},
#ifdef VK_KHR_android_surface
{
- VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, VK_KHR_ANDROID_SURFACE_SPEC_VERSION,
+ VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
+ VK_KHR_ANDROID_SURFACE_SPEC_VERSION,
},
#endif
{
- VK_KHR_BIND_MEMORY_2_EXTENSION_NAME, VK_KHR_BIND_MEMORY_2_SPEC_VERSION,
+ VK_KHR_BIND_MEMORY_2_EXTENSION_NAME,
+ VK_KHR_BIND_MEMORY_2_SPEC_VERSION,
},
{
- VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME, VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION,
+ VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
+ VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION,
},
{
- VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME, VK_KHR_COPY_COMMANDS_2_SPEC_VERSION,
+ VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME,
+ VK_KHR_COPY_COMMANDS_2_SPEC_VERSION,
},
{
- VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME, VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION,
+ VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME,
+ VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION,
},
{
- VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION,
+ VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME,
+ VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION,
},
{
- VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME, VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION,
+ VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME,
+ VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION,
},
{
VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME,
VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION,
},
{
- VK_KHR_DEVICE_GROUP_EXTENSION_NAME, VK_KHR_DEVICE_GROUP_SPEC_VERSION,
+ VK_KHR_DEVICE_GROUP_EXTENSION_NAME,
+ VK_KHR_DEVICE_GROUP_SPEC_VERSION,
},
{
- VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME, VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION,
+ VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME,
+ VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION,
},
#ifdef VK_KHR_display
{
- VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_DISPLAY_SPEC_VERSION,
+ VK_KHR_DISPLAY_EXTENSION_NAME,
+ VK_KHR_DISPLAY_SPEC_VERSION,
},
#endif
#ifdef VK_KHR_display_swapchain
{
- VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION,
+ VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME,
+ VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION,
},
#endif
{
- VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME, VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION,
+ VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME,
+ VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION,
},
{
- VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION,
+ VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME,
+ VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION,
},
{
- VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME, VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION,
+ VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME,
+ VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION,
},
{
- VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME, VK_KHR_EXTERNAL_FENCE_SPEC_VERSION,
+ VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_FENCE_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION,
},
{
- VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION,
+ VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION,
},
#ifdef VK_KHR_external_fence_win32
{
- VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME, VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION,
+ VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION,
},
#endif
{
- VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION,
+ VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION,
},
{
- VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION,
+ VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION,
},
#ifdef VK_KHR_external_memory_win32
{
- VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
+ VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
},
#endif
{
- VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION,
+ VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION,
},
{
- VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION,
+ VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION,
},
#ifdef VK_KHR_external_semaphore_win32
{
- VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION,
+ VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME,
+ VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION,
},
#endif
{
- VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME, VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION,
+ VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME,
+ VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION,
},
{
VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME,
VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION,
},
{
- VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME, VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION,
+ VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME,
+ VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION,
},
{
- VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION,
+ VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME,
+ VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION,
},
{
- VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION,
+ VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME,
+ VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION,
},
{
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
@@ -1332,86 +1461,108 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION,
},
{
- VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME, VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION,
+ VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME,
+ VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION,
},
{
- VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION,
+ VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME,
+ VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION,
},
{
- VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME, VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION,
+ VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME,
+ VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION,
},
{
- VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION,
+ VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME,
+ VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION,
},
{
- VK_KHR_MAINTENANCE_1_EXTENSION_NAME, VK_KHR_MAINTENANCE_1_SPEC_VERSION,
+ VK_KHR_MAINTENANCE_1_EXTENSION_NAME,
+ VK_KHR_MAINTENANCE_1_SPEC_VERSION,
},
{
- VK_KHR_MAINTENANCE_2_EXTENSION_NAME, VK_KHR_MAINTENANCE_2_SPEC_VERSION,
+ VK_KHR_MAINTENANCE_2_EXTENSION_NAME,
+ VK_KHR_MAINTENANCE_2_SPEC_VERSION,
},
{
- VK_KHR_MAINTENANCE_3_EXTENSION_NAME, VK_KHR_MAINTENANCE_3_SPEC_VERSION,
+ VK_KHR_MAINTENANCE_3_EXTENSION_NAME,
+ VK_KHR_MAINTENANCE_3_SPEC_VERSION,
},
{
- VK_KHR_MAINTENANCE_4_EXTENSION_NAME, VK_KHR_MAINTENANCE_4_SPEC_VERSION,
+ VK_KHR_MAINTENANCE_4_EXTENSION_NAME,
+ VK_KHR_MAINTENANCE_4_SPEC_VERSION,
},
{
- VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_SPEC_VERSION,
+ VK_KHR_MULTIVIEW_EXTENSION_NAME,
+ VK_KHR_MULTIVIEW_SPEC_VERSION,
},
{
- VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME, VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION,
+ VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME,
+ VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION,
},
{
VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME,
VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION,
},
{
- VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION,
+ VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME,
+ VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION,
},
{
- VK_KHR_PRESENT_ID_EXTENSION_NAME, VK_KHR_PRESENT_ID_SPEC_VERSION,
+ VK_KHR_PRESENT_ID_EXTENSION_NAME,
+ VK_KHR_PRESENT_ID_SPEC_VERSION,
},
{
- VK_KHR_PRESENT_WAIT_EXTENSION_NAME, VK_KHR_PRESENT_WAIT_SPEC_VERSION,
+ VK_KHR_PRESENT_WAIT_EXTENSION_NAME,
+ VK_KHR_PRESENT_WAIT_SPEC_VERSION,
},
{
- VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION,
+ VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME,
+ VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION,
},
{
- VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION,
+ VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME,
+ VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION,
},
{
VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,
VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION,
},
{
- VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION,
+ VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME,
+ VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION,
},
{
VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME,
VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION,
},
{
- VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME, VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION,
+ VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME,
+ VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION,
},
{
- VK_KHR_SHADER_CLOCK_EXTENSION_NAME, VK_KHR_SHADER_CLOCK_SPEC_VERSION,
+ VK_KHR_SHADER_CLOCK_EXTENSION_NAME,
+ VK_KHR_SHADER_CLOCK_SPEC_VERSION,
},
{
- VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION,
+ VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
+ VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION,
},
{
- VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME, VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION,
+ VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME,
+ VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION,
},
{
- VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME, VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION,
+ VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,
+ VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION,
},
{
VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME,
VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION,
},
{
- VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME, VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION,
+ VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME,
+ VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION,
},
{
VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME,
@@ -1426,57 +1577,69 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION,
},
{
- VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION,
+ VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME,
+ VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION,
},
{
- VK_KHR_SPIRV_1_4_EXTENSION_NAME, VK_KHR_SPIRV_1_4_SPEC_VERSION,
+ VK_KHR_SPIRV_1_4_EXTENSION_NAME,
+ VK_KHR_SPIRV_1_4_SPEC_VERSION,
},
{
VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME,
VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION,
},
{
- VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_SURFACE_SPEC_VERSION,
+ VK_KHR_SURFACE_EXTENSION_NAME,
+ VK_KHR_SURFACE_SPEC_VERSION,
},
{
VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME,
VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION,
},
{
- VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_SWAPCHAIN_SPEC_VERSION,
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME,
+ VK_KHR_SWAPCHAIN_SPEC_VERSION,
},
{
- VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME, VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION,
+ VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME,
+ VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION,
},
{
- VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME, VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION,
+ VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME,
+ VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION,
},
{
- VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME, VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION,
+ VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME,
+ VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION,
},
{
VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME,
VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION,
},
{
- VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, VK_KHR_VARIABLE_POINTERS_SPEC_VERSION,
+ VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME,
+ VK_KHR_VARIABLE_POINTERS_SPEC_VERSION,
},
{
- VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME, VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION,
+ VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME,
+ VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION,
},
#ifdef VK_KHR_wayland_surface
{
- VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, VK_KHR_WAYLAND_SURFACE_SPEC_VERSION,
+ VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
+ VK_KHR_WAYLAND_SURFACE_SPEC_VERSION,
},
#endif
#ifdef VK_KHR_win32_keyed_mutex
{
- VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME, VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION,
+ VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME,
+ VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION,
},
#endif
#ifdef VK_KHR_win32_surface
{
- VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_SPEC_VERSION,
+ VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
+ VK_KHR_WIN32_SURFACE_SPEC_VERSION,
},
#endif
{
@@ -1485,12 +1648,14 @@ static const VkExtensionProperties supportedExtensions[] = {
},
#ifdef VK_KHR_xcb_surface
{
- VK_KHR_XCB_SURFACE_EXTENSION_NAME, VK_KHR_XCB_SURFACE_SPEC_VERSION,
+ VK_KHR_XCB_SURFACE_EXTENSION_NAME,
+ VK_KHR_XCB_SURFACE_SPEC_VERSION,
},
#endif
#ifdef VK_KHR_xlib_surface
{
- VK_KHR_XLIB_SURFACE_EXTENSION_NAME, VK_KHR_XLIB_SURFACE_SPEC_VERSION,
+ VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
+ VK_KHR_XLIB_SURFACE_SPEC_VERSION,
},
#endif
{
@@ -1499,17 +1664,21 @@ static const VkExtensionProperties supportedExtensions[] = {
},
#ifdef VK_MVK_macos_surface
{
- VK_MVK_MACOS_SURFACE_EXTENSION_NAME, VK_MVK_MACOS_SURFACE_SPEC_VERSION,
+ VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
+ VK_MVK_MACOS_SURFACE_SPEC_VERSION,
},
#endif
{
- VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME, VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION,
+ VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME,
+ VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION,
},
{
- VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION,
+ VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME,
+ VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION,
},
{
- VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME, VK_NV_EXTERNAL_MEMORY_SPEC_VERSION,
+ VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME,
+ VK_NV_EXTERNAL_MEMORY_SPEC_VERSION,
},
{
VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
@@ -1517,7 +1686,8 @@ static const VkExtensionProperties supportedExtensions[] = {
},
#ifdef VK_NV_external_memory_win32
{
- VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
+ VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
+ VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
},
#endif
{
@@ -1533,18 +1703,21 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION,
},
{
- VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME, VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION,
+ VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME,
+ VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION,
},
{
VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME,
VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION,
},
{
- VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION,
+ VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME,
+ VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION,
},
#ifdef VK_NV_win32_keyed_mutex
{
- VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME, VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION,
+ VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME,
+ VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION,
},
#endif
{
@@ -1556,10 +1729,12 @@ static const VkExtensionProperties supportedExtensions[] = {
VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION,
},
{
- VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME, VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION,
+ VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME,
+ VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION,
},
{
- VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME, VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION,
+ VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME,
+ VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION,
},
};
@@ -1928,7 +2103,10 @@ void WrappedVulkan::StartFrameCapture(DeviceOwnedWindow devWnd)
{
VkMemoryBarrier memBarrier = {
- VK_STRUCTURE_TYPE_MEMORY_BARRIER, NULL, VK_ACCESS_ALL_WRITE_BITS, VK_ACCESS_ALL_READ_BITS,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ NULL,
+ VK_ACCESS_ALL_WRITE_BITS,
+ VK_ACCESS_ALL_READ_BITS,
};
VkCommandBuffer cmd = GetNextCmd();
@@ -2174,7 +2352,9 @@ bool WrappedVulkan::EndFrameCapture(DeviceOwnedWindow devWnd)
0,
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
{imageInfo.extent.width, imageInfo.extent.height, 1},
};
@@ -3141,7 +3321,10 @@ void WrappedVulkan::ApplyInitialContents()
// this is a very blunt instrument but it ensures we don't get random artifacts around
// frame restart where we may be skipping a lot of important synchronisation
VkMemoryBarrier memBarrier = {
- VK_STRUCTURE_TYPE_MEMORY_BARRIER, NULL, VK_ACCESS_ALL_WRITE_BITS, VK_ACCESS_ALL_READ_BITS,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ NULL,
+ VK_ACCESS_ALL_WRITE_BITS,
+ VK_ACCESS_ALL_READ_BITS,
};
VkCommandBuffer cmd = GetNextCmd();
diff --git a/renderdoc/driver/vulkan/vk_debug.cpp b/renderdoc/driver/vulkan/vk_debug.cpp
index 9f4b031ac..21dde8505 100644
--- a/renderdoc/driver/vulkan/vk_debug.cpp
+++ b/renderdoc/driver/vulkan/vk_debug.cpp
@@ -278,9 +278,13 @@ static void create(WrappedVulkan *driver, const char *objName, const int line, V
const VkPipelineColorBlendAttachmentState colAttach = {
info.blendEnable,
// colour blending
- info.srcBlend, info.dstBlend, VK_BLEND_OP_ADD,
+ info.srcBlend,
+ info.dstBlend,
+ VK_BLEND_OP_ADD,
// alpha blending
- info.srcBlend, info.dstBlend, VK_BLEND_OP_ADD,
+ info.srcBlend,
+ info.dstBlend,
+ VK_BLEND_OP_ADD,
// write mask
info.writeMask,
};
@@ -536,7 +540,9 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver)
// allocate memory
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, depthmrq.size + mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ depthmrq.size + mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -566,7 +572,11 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver)
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},
{
- viewAspectMask, 0, 1, 0, 1,
+ viewAspectMask,
+ 0,
+ 1,
+ 0,
+ 1,
},
};
@@ -635,7 +645,10 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver)
};
VkSampleCountFlagBits sampleCounts[] = {
- VK_SAMPLE_COUNT_2_BIT, VK_SAMPLE_COUNT_4_BIT, VK_SAMPLE_COUNT_8_BIT, VK_SAMPLE_COUNT_16_BIT,
+ VK_SAMPLE_COUNT_2_BIT,
+ VK_SAMPLE_COUNT_4_BIT,
+ VK_SAMPLE_COUNT_8_BIT,
+ VK_SAMPLE_COUNT_16_BIT,
};
RDCCOMPILE_ASSERT(ARRAY_COUNT(m_DepthArray2MSPipe) == ARRAY_COUNT(formats),
@@ -782,8 +795,16 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver)
VkWriteDescriptorSet writes[] = {
{
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, NULL, Unwrap(m_DiscardSet[i]), 0, 0, 1,
- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, NULL, &bufInfo, NULL,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ NULL,
+ Unwrap(m_DiscardSet[i]),
+ 0,
+ 0,
+ 1,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
+ NULL,
+ &bufInfo,
+ NULL,
},
};
@@ -938,7 +959,9 @@ void VulkanDebugManager::CreateCustomShaderTex(uint32_t width, uint32_t height,
m_pDriver->vkFreeMemory(m_Device, m_Custom.TexMem, NULL);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -964,7 +987,11 @@ void VulkanDebugManager::CreateCustomShaderTex(uint32_t width, uint32_t height,
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ 1,
+ 0,
+ 1,
},
};
@@ -2011,8 +2038,9 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
baseType = BuiltinShaderBaseType::UInt;
VkAttachmentReference attRef = {
- 0, depth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
- : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
+ 0,
+ depth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
+ : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
};
VkAttachmentDescription attDesc = {
@@ -2028,7 +2056,8 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
};
VkSubpassDescription sub = {
- 0, VK_PIPELINE_BIND_POINT_GRAPHICS,
+ 0,
+ VK_PIPELINE_BIND_POINT_GRAPHICS,
};
if(depth)
@@ -2106,7 +2135,11 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},
{
- aspectMask, 0, 1, a, 1,
+ aspectMask,
+ 0,
+ 1,
+ a,
+ 1,
},
};
@@ -2170,13 +2203,18 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
uint32_t pass = 0;
VkImageMemoryBarrier dstimBarrier = {
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, NULL,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
+ NULL,
VK_ACCESS_ALL_READ_BITS | VK_ACCESS_ALL_WRITE_BITS,
depth ? (VkAccessFlags)VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
: (VkAccessFlags)VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
- curLayout, depth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
- : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, Unwrap(image), barrierDiscardRange,
+ curLayout,
+ depth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
+ : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ Unwrap(image),
+ barrierDiscardRange,
};
DoPipelineBarrier(cmd, 1, &dstimBarrier);
@@ -2275,7 +2313,9 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
stage.Unmap();
VkBufferCreateInfo bufInfo = {
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ NULL,
+ 0,
pattern.size() * (PatternBatchWidth / DiscardPatternWidth) *
(PatternBatchHeight / DiscardPatternHeight),
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT,
@@ -2380,7 +2420,9 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
0,
{aspectFlags, m, a, 1},
{
- (int)x, (int)y, (int)z,
+ (int)x,
+ (int)y,
+ (int)z,
},
};
@@ -3437,7 +3479,9 @@ void VulkanReplay::TextureRendering::Init(WrappedVulkan *driver, VkDescriptorPoo
VK_FORMAT_R8G8B8A8_SINT, VK_FORMAT_D16_UNORM};
VkImageType types[] = {VK_IMAGE_TYPE_1D, VK_IMAGE_TYPE_2D, VK_IMAGE_TYPE_3D, VK_IMAGE_TYPE_2D};
VkImageViewType viewtypes[] = {
- VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY, VK_IMAGE_VIEW_TYPE_3D,
+ VK_IMAGE_VIEW_TYPE_1D_ARRAY,
+ VK_IMAGE_VIEW_TYPE_2D_ARRAY,
+ VK_IMAGE_VIEW_TYPE_3D,
VK_IMAGE_VIEW_TYPE_2D_ARRAY,
driver->GetDeviceEnabledFeatures().imageCubeArray ? VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
: VK_IMAGE_VIEW_TYPE_CUBE,
@@ -3641,7 +3685,11 @@ void VulkanReplay::TextureRendering::Init(WrappedVulkan *driver, VkDescriptorPoo
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ 1,
+ 0,
+ 1,
},
};
@@ -3701,7 +3749,9 @@ void VulkanReplay::TextureRendering::Init(WrappedVulkan *driver, VkDescriptorPoo
if(DummyBuffer != VK_NULL_HANDLE)
{
VkFormat bufViewTypes[] = {
- VK_FORMAT_R32G32B32A32_SFLOAT, VK_FORMAT_R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_SINT,
+ VK_FORMAT_R32G32B32A32_SFLOAT,
+ VK_FORMAT_R32G32B32A32_UINT,
+ VK_FORMAT_R32G32B32A32_SINT,
};
for(size_t i = 0; i < ARRAY_COUNT(bufViewTypes); i++)
{
@@ -3940,15 +3990,40 @@ void VulkanReplay::MeshRendering::Init(WrappedVulkan *driver, VkDescriptorPool d
Vec4f axisFrustum[] = {
// axis marker vertices
- Vec4f(0.0f, 0.0f, 0.0f, 1.0f), Vec4f(1.0f, 0.0f, 0.0f, 1.0f), Vec4f(0.0f, 0.0f, 0.0f, 1.0f),
- Vec4f(0.0f, 1.0f, 0.0f, 1.0f), Vec4f(0.0f, 0.0f, 0.0f, 1.0f), Vec4f(0.0f, 0.0f, 1.0f, 1.0f),
+ Vec4f(0.0f, 0.0f, 0.0f, 1.0f),
+ Vec4f(1.0f, 0.0f, 0.0f, 1.0f),
+ Vec4f(0.0f, 0.0f, 0.0f, 1.0f),
+ Vec4f(0.0f, 1.0f, 0.0f, 1.0f),
+ Vec4f(0.0f, 0.0f, 0.0f, 1.0f),
+ Vec4f(0.0f, 0.0f, 1.0f, 1.0f),
// frustum vertices
- TLN, TRN, TRN, BRN, BRN, BLN, BLN, TLN,
+ TLN,
+ TRN,
+ TRN,
+ BRN,
+ BRN,
+ BLN,
+ BLN,
+ TLN,
- TLN, TLF, TRN, TRF, BLN, BLF, BRN, BRF,
+ TLN,
+ TLF,
+ TRN,
+ TRF,
+ BLN,
+ BLF,
+ BRN,
+ BRF,
- TLF, TRF, TRF, BRF, BRF, BLF, BLF, TLF,
+ TLF,
+ TRF,
+ TRF,
+ BRF,
+ BRF,
+ BLF,
+ BLF,
+ TLF,
};
// doesn't need to be ring'd as it's immutable
@@ -4088,7 +4163,9 @@ void VulkanReplay::PixelPicking::Init(WrappedVulkan *driver, VkDescriptorPool de
// allocate readback memory
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -4108,7 +4185,11 @@ void VulkanReplay::PixelPicking::Init(WrappedVulkan *driver, VkDescriptorPool de
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ 1,
+ 0,
+ 1,
},
};
@@ -4186,7 +4267,8 @@ void VulkanReplay::PixelHistory::Init(WrappedVulkan *driver, VkDescriptorPool de
VkResult vkr = VK_SUCCESS;
VkDescriptorPoolSize descPoolTypes[] = {
- {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 64}, {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 32},
+ {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 64},
+ {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 32},
};
VkDescriptorPoolCreateInfo descPoolInfo = {
@@ -4409,7 +4491,9 @@ void ShaderDebugData::Init(WrappedVulkan *driver, VkDescriptorPool descriptorPoo
// allocate readback memory
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -4429,7 +4513,11 @@ void ShaderDebugData::Init(WrappedVulkan *driver, VkDescriptorPool descriptorPoo
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ 1,
+ 0,
+ 1,
},
};
@@ -4458,14 +4546,22 @@ void ShaderDebugData::Init(WrappedVulkan *driver, VkDescriptorPool descriptorPoo
VkSubpassDependency deps[2] = {
{
- VK_SUBPASS_EXTERNAL, 0, VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_ACCESS_TRANSFER_READ_BIT,
- VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, 0,
+ VK_SUBPASS_EXTERNAL,
+ 0,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
+ VK_ACCESS_TRANSFER_READ_BIT,
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
+ 0,
},
{
- 0, VK_SUBPASS_EXTERNAL, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
- VK_ACCESS_TRANSFER_READ_BIT, 0,
+ 0,
+ VK_SUBPASS_EXTERNAL,
+ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
+ VK_ACCESS_TRANSFER_READ_BIT,
+ 0,
},
};
diff --git a/renderdoc/driver/vulkan/vk_dispatchtables.cpp b/renderdoc/driver/vulkan/vk_dispatchtables.cpp
index 25f7e3784..252b30da4 100644
--- a/renderdoc/driver/vulkan/vk_dispatchtables.cpp
+++ b/renderdoc/driver/vulkan/vk_dispatchtables.cpp
@@ -38,8 +38,8 @@ void InitReplayTables(void *vulkanModule)
{
replay = true;
-// not all functions will succeed - some need to be fetched through the below
-// InitDeviceReplayTable()
+ // not all functions will succeed - some need to be fetched through the below
+ // InitDeviceReplayTable()
#undef HookInit
#define HookInit(name) \
diff --git a/renderdoc/driver/vulkan/vk_initstate.cpp b/renderdoc/driver/vulkan/vk_initstate.cpp
index ae0d64b33..e7eb877e2 100644
--- a/renderdoc/driver/vulkan/vk_initstate.cpp
+++ b/renderdoc/driver/vulkan/vk_initstate.cpp
@@ -219,9 +219,12 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
bufAlignment = (VkDeviceSize)GetByteSize(1, 1, 1, imageInfo.format, 0);
VkBufferCreateInfo bufInfo = {
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0, 0, VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
- VK_BUFFER_USAGE_TRANSFER_DST_BIT |
- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ NULL,
+ 0,
+ 0,
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT |
+ VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
};
VkImage realim = im->real.As();
@@ -378,7 +381,9 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
0,
{aspectFlags, (uint32_t)m, (uint32_t)a, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
extent,
};
@@ -710,7 +715,7 @@ SparseBinding::SparseBinding(WrappedVulkan *vk, VkBuffer unwrappedBuffer,
//
)
//
- )
+ )
{
// apply the previous bind for one more page
previousBind.size += mrq.alignment;
@@ -900,7 +905,9 @@ SparseBinding::SparseBinding(WrappedVulkan *vk, VkImage unwrappedImage,
const Sparse::PageRangeMapping &mapping = table.getSubresource(sub);
Sparse::Coord mipDim = {
- RDCMAX(1U, texDim.x >> mip), RDCMAX(1U, texDim.y >> mip), RDCMAX(1U, texDim.z >> mip),
+ RDCMAX(1U, texDim.x >> mip),
+ RDCMAX(1U, texDim.y >> mip),
+ RDCMAX(1U, texDim.z >> mip),
};
Sparse::Coord dim = table.calcSubresourcePageDim(sub);
@@ -1562,7 +1569,10 @@ bool WrappedVulkan::Serialise_InitialState(SerialiserType &ser, ResourceId id, V
// create a buffer with memory attached, which we will fill with the initial contents
VkBufferCreateInfo gpuBufInfo = {
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0, ContentsSize,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ NULL,
+ 0,
+ ContentsSize,
VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT |
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
};
@@ -2028,7 +2038,9 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, const VkInitialConten
0,
{aspectFlags, m, a, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
extent,
};
diff --git a/renderdoc/driver/vulkan/vk_layer.cpp b/renderdoc/driver/vulkan/vk_layer.cpp
index 69e3f3356..77bb4702e 100644
--- a/renderdoc/driver/vulkan/vk_layer.cpp
+++ b/renderdoc/driver/vulkan/vk_layer.cpp
@@ -201,8 +201,11 @@ VulkanHook VulkanHook::vkhooks;
// RenderDoc Intercepts, these must all be entry points with a dispatchable object
// as the first parameter
-#define HookDefine1(ret, function, t1, p1) \
- VKAPI_ATTR ret VKAPI_CALL CONCAT(hooked_, function)(t1 p1) { return CoreDisp(p1)->function(p1); }
+#define HookDefine1(ret, function, t1, p1) \
+ VKAPI_ATTR ret VKAPI_CALL CONCAT(hooked_, function)(t1 p1) \
+ { \
+ return CoreDisp(p1)->function(p1); \
+ }
#define HookDefine2(ret, function, t1, p1, t2, p2) \
VKAPI_ATTR ret VKAPI_CALL CONCAT(hooked_, function)(t1 p1, t2 p2) \
{ \
@@ -330,7 +333,8 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL VK_LAYER_RENDERDOC_CaptureEnumera
return VK_INCOMPLETE;
const VkLayerProperties layerProperties = {
- RENDERDOC_VULKAN_LAYER_NAME, VK_API_VERSION_1_0,
+ RENDERDOC_VULKAN_LAYER_NAME,
+ VK_API_VERSION_1_0,
VK_MAKE_VERSION(RENDERDOC_VERSION_MAJOR, RENDERDOC_VERSION_MINOR, 0),
"Debugging capture layer for RenderDoc",
};
@@ -393,12 +397,12 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties(
// for promoted extensions, we return the function pointer for either name as an alias.
#undef HookInitPromotedExtension
-#define HookInitPromotedExtension(cond, function, suffix) \
- if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
- !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
- { \
- if(cond) \
- return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function); \
+#define HookInitPromotedExtension(cond, function, suffix) \
+ if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
+ !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
+ { \
+ if(cond) \
+ return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function); \
}
// proc addr routines
@@ -486,7 +490,7 @@ VK_LAYER_RENDERDOC_CaptureGetInstanceProcAddr(VkInstance instance, const char *p
HookInitVulkanInstanceExts();
-// GetInstanceProcAddr must also unconditionally return all device functions
+ // GetInstanceProcAddr must also unconditionally return all device functions
#undef HookInitExtension
#define HookInitExtension(cond, function) \
@@ -494,9 +498,9 @@ VK_LAYER_RENDERDOC_CaptureGetInstanceProcAddr(VkInstance instance, const char *p
return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function);
#undef HookInitPromotedExtension
-#define HookInitPromotedExtension(cond, function, suffix) \
- if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
- !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
+#define HookInitPromotedExtension(cond, function, suffix) \
+ if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
+ !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function);
HookInitVulkanDevice();
@@ -571,9 +575,9 @@ VK_LAYER_RENDERDOC_Capture_layerGetPhysicalDeviceProcAddr(VkInstance instance, c
return NULL;
#undef HookInitPromotedExtension
-#define HookInitPromotedExtension(cond, function, suffix) \
- if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
- !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
+#define HookInitPromotedExtension(cond, function, suffix) \
+ if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
+ !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
return NULL;
HookInitVulkanInstanceExts();
diff --git a/renderdoc/driver/vulkan/vk_manager.h b/renderdoc/driver/vulkan/vk_manager.h
index 7d8b96475..085529643 100644
--- a/renderdoc/driver/vulkan/vk_manager.h
+++ b/renderdoc/driver/vulkan/vk_manager.h
@@ -207,15 +207,15 @@ public:
template
realtype GetLiveHandle(ResourceId origid)
{
- return realtype((uint64_t)(
- (typename UnwrapHelper::ParentType *)ResourceManager::GetLiveResource(origid)));
+ return realtype((uint64_t)((
+ typename UnwrapHelper::ParentType *)ResourceManager::GetLiveResource(origid)));
}
template
realtype GetCurrentHandle(ResourceId id)
{
- return realtype((uint64_t)(
- (typename UnwrapHelper::ParentType *)ResourceManager::GetCurrentResource(id)));
+ return realtype((uint64_t)((
+ typename UnwrapHelper::ParentType *)ResourceManager::GetCurrentResource(id)));
}
// handling memory & image layouts
diff --git a/renderdoc/driver/vulkan/vk_memory.cpp b/renderdoc/driver/vulkan/vk_memory.cpp
index 0bb764d5e..c271f056d 100644
--- a/renderdoc/driver/vulkan/vk_memory.cpp
+++ b/renderdoc/driver/vulkan/vk_memory.cpp
@@ -320,7 +320,10 @@ MemoryAllocation WrappedVulkan::AllocateMemoryForResource(bool buffer, VkMemoryR
}
VkMemoryAllocateInfo info = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, allocSize * 1024 * 1024, memoryTypeIndex,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ allocSize * 1024 * 1024,
+ memoryTypeIndex,
};
if(ret.size > info.allocationSize)
diff --git a/renderdoc/driver/vulkan/vk_msaa_buffer_conv.cpp b/renderdoc/driver/vulkan/vk_msaa_buffer_conv.cpp
index 4345206e5..d12fa636e 100644
--- a/renderdoc/driver/vulkan/vk_msaa_buffer_conv.cpp
+++ b/renderdoc/driver/vulkan/vk_msaa_buffer_conv.cpp
@@ -61,7 +61,11 @@ void VulkanDebugManager::CopyTex2DMSToBuffer(VkCommandBuffer cmd, VkBuffer destB
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ VK_REMAINING_MIP_LEVELS,
+ 0,
+ VK_REMAINING_ARRAY_LAYERS,
},
};
@@ -152,7 +156,8 @@ void VulkanDebugManager::CopyTex2DMSToBuffer(VkCommandBuffer cmd, VkBuffer destB
const uint32_t maxInvoc = AlignUp(extent.width * extent.height, msDivider) / msDivider;
Vec4u params[2] = {
- {extent.width, currentSlice, currentSample, bs}, {maxInvoc, dispatchOffset, 0, 0},
+ {extent.width, currentSlice, currentSample, bs},
+ {maxInvoc, dispatchOffset, 0, 0},
};
ObjDisp(cmd)->CmdPushConstants(Unwrap(cmd), Unwrap(m_BufferMSPipeLayout),
@@ -227,7 +232,11 @@ void VulkanDebugManager::CopyDepthTex2DMSToBuffer(VkCommandBuffer cmd, VkBuffer
{VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO,
VK_COMPONENT_SWIZZLE_ZERO},
{
- VK_IMAGE_ASPECT_DEPTH_BIT, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS,
+ VK_IMAGE_ASPECT_DEPTH_BIT,
+ 0,
+ VK_REMAINING_MIP_LEVELS,
+ 0,
+ VK_REMAINING_ARRAY_LAYERS,
},
};
@@ -333,15 +342,17 @@ void VulkanDebugManager::CopyDepthTex2DMSToBuffer(VkCommandBuffer cmd, VkBuffer
for(uint32_t currentSample = baseSample; currentSample < numSamples + baseSample; currentSample++)
{
// for D16 and S8 textures, we need to multisample.
- const uint32_t msDivider =
- (fmt == VK_FORMAT_D16_UNORM) ? 2 : (fmt == VK_FORMAT_S8_UINT) ? 4 : 1;
+ const uint32_t msDivider = (fmt == VK_FORMAT_D16_UNORM) ? 2
+ : (fmt == VK_FORMAT_S8_UINT) ? 4
+ : 1;
const uint32_t workGroupDivider = MS_DISPATCH_LOCAL_SIZE * msDivider;
const uint32_t numWorkGroup =
AlignUp(extent.width * extent.height, workGroupDivider) / workGroupDivider;
const uint32_t maxInvoc = AlignUp(extent.width * extent.height, msDivider) / msDivider;
Vec4u params[2] = {
- {extent.width, currentSlice, currentSample, fmtIndex}, {maxInvoc, dispatchOffset, 0, 0},
+ {extent.width, currentSlice, currentSample, fmtIndex},
+ {maxInvoc, dispatchOffset, 0, 0},
};
ObjDisp(cmd)->CmdPushConstants(Unwrap(cmd), Unwrap(m_BufferMSPipeLayout), VK_SHADER_STAGE_ALL,
@@ -398,7 +409,11 @@ void VulkanDebugManager::CopyBufferToTex2DMS(VkCommandBuffer cmd, VkImage destMS
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ VK_REMAINING_MIP_LEVELS,
+ 0,
+ VK_REMAINING_ARRAY_LAYERS,
},
};
@@ -488,7 +503,8 @@ void VulkanDebugManager::CopyBufferToTex2DMS(VkCommandBuffer cmd, VkImage destMS
const uint32_t maxInvoc = AlignUp(extent.width * extent.height, msDivider) / msDivider;
Vec4u params[2] = {
- {extent.width, currentSlice, currentSample, bs}, {maxInvoc, dispatchOffset, 0, 0},
+ {extent.width, currentSlice, currentSample, bs},
+ {maxInvoc, dispatchOffset, 0, 0},
};
ObjDisp(cmd)->CmdPushConstants(Unwrap(cmd), Unwrap(m_BufferMSPipeLayout),
@@ -592,7 +608,11 @@ void VulkanDebugManager::CopyDepthBufferToTex2DMS(VkCommandBuffer cmd, VkImage d
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- aspectFlags, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS,
+ aspectFlags,
+ 0,
+ VK_REMAINING_MIP_LEVELS,
+ 0,
+ VK_REMAINING_ARRAY_LAYERS,
},
};
diff --git a/renderdoc/driver/vulkan/vk_next_chains.cpp b/renderdoc/driver/vulkan/vk_next_chains.cpp
index 38d641637..9d6356c93 100644
--- a/renderdoc/driver/vulkan/vk_next_chains.cpp
+++ b/renderdoc/driver/vulkan/vk_next_chains.cpp
@@ -2782,8 +2782,8 @@ void CopyNextChainForPatching(const char *structName, byte *&tempMem, VkBaseInSt
VkBaseInStructure *nextChainTail = infoStruct;
const VkBaseInStructure *nextInput = (const VkBaseInStructure *)infoStruct->pNext;
-// simplified version of UnwrapNextChain which just copies everything. Useful for when we need to
-// shallow duplicate a next chain (e.g. because we'll copy and patch one struct)
+ // simplified version of UnwrapNextChain which just copies everything. Useful for when we need to
+ // shallow duplicate a next chain (e.g. because we'll copy and patch one struct)
#undef COPY_STRUCT_CAPTURE_ONLY
#define COPY_STRUCT_CAPTURE_ONLY(StructType, StructName) \
diff --git a/renderdoc/driver/vulkan/vk_outputwindow.cpp b/renderdoc/driver/vulkan/vk_outputwindow.cpp
index 7495476b5..926fe9b9d 100644
--- a/renderdoc/driver/vulkan/vk_outputwindow.cpp
+++ b/renderdoc/driver/vulkan/vk_outputwindow.cpp
@@ -458,7 +458,9 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device,
vt->GetImageMemoryRequirements(Unwrap(device), Unwrap(dsimg), &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -610,7 +612,9 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device,
vt->GetImageMemoryRequirements(Unwrap(device), Unwrap(bb), &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -727,7 +731,9 @@ void VulkanReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
vt->GetBufferMemoryRequirements(Unwrap(device), readbackBuf, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetReadbackMemoryIndex(mrq.memoryTypeBits),
};
@@ -754,7 +760,9 @@ void VulkanReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
0,
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
{outw.width, outw.height, 1},
};
@@ -1203,11 +1211,13 @@ void VulkanReplay::FlipOutputWindow(uint64_t id)
VkImageBlit blit = {
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
{
- {0, 0, 0}, {(int32_t)outw.width, (int32_t)outw.height, 1},
+ {0, 0, 0},
+ {(int32_t)outw.width, (int32_t)outw.height, 1},
},
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
{
- {0, 0, 0}, {(int32_t)outw.width, (int32_t)outw.height, 1},
+ {0, 0, 0},
+ {(int32_t)outw.width, (int32_t)outw.height, 1},
},
};
diff --git a/renderdoc/driver/vulkan/vk_overlay.cpp b/renderdoc/driver/vulkan/vk_overlay.cpp
index f0c73d2cb..63e703a5d 100644
--- a/renderdoc/driver/vulkan/vk_overlay.cpp
+++ b/renderdoc/driver/vulkan/vk_overlay.cpp
@@ -572,7 +572,9 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
}
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -2027,7 +2029,9 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
}
VkClearRect rect = {
- state.renderArea, 0, 1,
+ state.renderArea,
+ 0,
+ 1,
};
vt->CmdClearAttachments(Unwrap(cmd), (uint32_t)atts.size(), &atts[0], 1, &rect);
@@ -2136,7 +2140,9 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
m_pDriver->vkGetImageMemoryRequirements(m_Device, quadImg, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -2209,7 +2215,10 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
DoPipelineBarrier(cmd, 1, &quadImBarrier);
VkMemoryBarrier memBarrier = {
- VK_STRUCTURE_TYPE_MEMORY_BARRIER, NULL, VK_ACCESS_ALL_WRITE_BITS, VK_ACCESS_ALL_READ_BITS,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ NULL,
+ VK_ACCESS_ALL_WRITE_BITS,
+ VK_ACCESS_ALL_READ_BITS,
};
DoPipelineBarrier(cmd, 1, &memBarrier);
@@ -2546,7 +2555,8 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
};
VkVertexInputAttributeDescription vertAttrs[] = {
- {0, 0, VK_FORMAT_R32G32B32A32_SFLOAT, 0}, {1, 0, VK_FORMAT_R32G32B32A32_SFLOAT, 0},
+ {0, 0, VK_FORMAT_R32G32B32A32_SFLOAT, 0},
+ {1, 0, VK_FORMAT_R32G32B32A32_SFLOAT, 0},
};
VkPipelineVertexInputStateCreateInfo vi = {
diff --git a/renderdoc/driver/vulkan/vk_pixelhistory.cpp b/renderdoc/driver/vulkan/vk_pixelhistory.cpp
index 46700f98f..0392db016 100644
--- a/renderdoc/driver/vulkan/vk_pixelhistory.cpp
+++ b/renderdoc/driver/vulkan/vk_pixelhistory.cpp
@@ -246,9 +246,9 @@ struct PixelHistoryShaderCache
{
if(m_pDriver->GetExtensions(NULL).ext_KHR_buffer_device_address)
{
- dummybuf.Create(vk, vk->GetDev(), 1024, 1, GPUBuffer::eGPUBufferGPULocal |
- GPUBuffer::eGPUBufferSSBO |
- GPUBuffer::eGPUBufferAddressable);
+ dummybuf.Create(vk, vk->GetDev(), 1024, 1,
+ GPUBuffer::eGPUBufferGPULocal | GPUBuffer::eGPUBufferSSBO |
+ GPUBuffer::eGPUBufferAddressable);
}
else
{
@@ -1313,12 +1313,19 @@ protected:
if(p.multisampled)
{
VkImageMemoryBarrier barrier = {
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, NULL,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
+ NULL,
VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT |
VK_ACCESS_MEMORY_WRITE_BIT,
- VK_ACCESS_SHADER_READ_BIT, p.srcImageLayout, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
- VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, Unwrap(p.srcImage), subresource};
+ VK_ACCESS_SHADER_READ_BIT,
+ p.srcImageLayout,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ Unwrap(p.srcImage),
+ subresource,
+ };
SanitiseOldImageLayout(barrier.oldLayout);
VkDescriptorSet descSet = GetCopyDescriptor(p.srcImage, p.srcImageFormat, baseMip, baseSlice);
@@ -1376,12 +1383,19 @@ protected:
}
VkImageMemoryBarrier barrier = {
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, NULL,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
+ NULL,
VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT |
VK_ACCESS_MEMORY_WRITE_BIT,
- VK_ACCESS_TRANSFER_READ_BIT, p.srcImageLayout, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
- VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, Unwrap(p.srcImage), subresource};
+ VK_ACCESS_TRANSFER_READ_BIT,
+ p.srcImageLayout,
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ Unwrap(p.srcImage),
+ subresource,
+ };
SanitiseOldImageLayout(barrier.oldLayout);
DoPipelineBarrier(cmd, 1, &barrier);
@@ -2989,8 +3003,9 @@ struct VulkanPixelHistoryPerFragmentCallback : VulkanPixelHistoryCallback
m_pDriver->ReplayDraw(cmd, *action);
state.EndRenderPass(cmd);
- CopyImagePixel(cmd, colourCopyParams, (fragsProcessed + f) * sizeof(PerFragmentInfo) +
- offsetof(struct PerFragmentInfo, postMod));
+ CopyImagePixel(cmd, colourCopyParams,
+ (fragsProcessed + f) * sizeof(PerFragmentInfo) +
+ offsetof(struct PerFragmentInfo, postMod));
if(depthImage != VK_NULL_HANDLE)
{
@@ -2998,9 +3013,10 @@ struct VulkanPixelHistoryPerFragmentCallback : VulkanPixelHistoryCallback
depthCopyParams.srcImage = m_CallbackInfo.dsImage;
depthCopyParams.srcImageLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
depthCopyParams.srcImageFormat = m_CallbackInfo.dsFormat;
- CopyImagePixel(cmd, depthCopyParams, (fragsProcessed + f) * sizeof(PerFragmentInfo) +
- offsetof(struct PerFragmentInfo, postMod) +
- offsetof(struct PixelHistoryValue, depth));
+ CopyImagePixel(cmd, depthCopyParams,
+ (fragsProcessed + f) * sizeof(PerFragmentInfo) +
+ offsetof(struct PerFragmentInfo, postMod) +
+ offsetof(struct PixelHistoryValue, depth));
}
}
@@ -3462,7 +3478,9 @@ bool VulkanDebugManager::PixelHistorySetupResources(PixelHistoryResources &resou
totalMemorySize = offset + stencilImageMrq.size;
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, totalMemorySize,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ totalMemorySize,
m_pDriver->GetGPULocalMemoryIndex(colorImageMrq.memoryTypeBits),
};
vkr = m_pDriver->vkAllocateMemory(m_Device, &allocInfo, NULL, &gpuMem);
@@ -3594,7 +3612,9 @@ bool VulkanDebugManager::PixelHistorySetupPerFragResources(PixelHistoryResources
VkMemoryRequirements mrq = {};
m_pDriver->vkGetBufferMemoryRequirements(m_Device, resources.dstBuffer, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetReadbackMemoryIndex(mrq.memoryTypeBits),
};
vkr = m_pDriver->vkAllocateMemory(m_Device, &allocInfo, NULL, &resources.bufferMemory);
diff --git a/renderdoc/driver/vulkan/vk_posix.cpp b/renderdoc/driver/vulkan/vk_posix.cpp
index d8e34aea9..ac0bb4e06 100644
--- a/renderdoc/driver/vulkan/vk_posix.cpp
+++ b/renderdoc/driver/vulkan/vk_posix.cpp
@@ -189,7 +189,7 @@ void WrappedVulkan::AddRequiredExtensions(bool instance, rdcarray &exten
#elif defined(VK_USE_PLATFORM_METAL_EXT)
VK_EXT_METAL_SURFACE_EXTENSION_NAME
#endif
- );
+ );
#endif
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
@@ -271,7 +271,7 @@ static rdcstr GenerateJSON(const rdcstr &sopath)
while(idx >= 0)
{
json = json.substr(0, idx) + STRINGIZE(RENDERDOC_VERSION_MAJOR) +
- json.substr(idx + sizeof(majorString) - 1);
+ json.substr(idx + sizeof(majorString) - 1);
idx = json.find(majorString);
}
@@ -282,7 +282,7 @@ static rdcstr GenerateJSON(const rdcstr &sopath)
while(idx >= 0)
{
json = json.substr(0, idx) + STRINGIZE(RENDERDOC_VERSION_MINOR) +
- json.substr(idx + sizeof(minorString) - 1);
+ json.substr(idx + sizeof(minorString) - 1);
idx = json.find(minorString);
}
diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp
index bbd2a2487..ac9b8750e 100644
--- a/renderdoc/driver/vulkan/vk_postvs.cpp
+++ b/renderdoc/driver/vulkan/vk_postvs.cpp
@@ -1606,16 +1606,27 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
VkDescriptorSetLayoutBinding newBindings[] = {
// output buffer
{
- 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL,
+ 0,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ 1,
+ VK_SHADER_STAGE_COMPUTE_BIT,
+ NULL,
},
// index buffer (if needed)
{
- 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL,
+ 1,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ 1,
+ VK_SHADER_STAGE_COMPUTE_BIT,
+ NULL,
},
// vertex buffers
{
- 2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, MeshOutputBufferArraySize,
- VK_SHADER_STAGE_COMPUTE_BIT, NULL,
+ 2,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ MeshOutputBufferArraySize,
+ VK_SHADER_STAGE_COMPUTE_BIT,
+ NULL,
},
};
RDCCOMPILE_ASSERT(ARRAY_COUNT(newBindings) == MeshOutputReservedBindings,
@@ -1744,7 +1755,9 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
uint32_t maxInstance = action->instanceOffset + action->numInstances - 1;
const VkMemoryAllocateFlagsInfo memFlags = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, NULL, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
+ NULL,
+ VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT,
};
if(action->flags & ActionFlags::Indexed)
@@ -1904,7 +1917,9 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
m_pDriver->vkGetBufferMemoryRequirements(dev, uniqIdxBuf, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetUploadMemoryIndex(mrq.memoryTypeBits),
};
@@ -2215,7 +2230,9 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
m_pDriver->vkGetBufferMemoryRequirements(dev, vbuffers[attr].buf, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetUploadMemoryIndex(mrq.memoryTypeBits),
};
@@ -2490,7 +2507,9 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
m_pDriver->vkGetBufferMemoryRequirements(dev, meshBuffer, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -2687,7 +2706,8 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
meshbufbarrier.size = VK_WHOLE_SIZE;
VkMemoryBarrier globalbarrier = {
- VK_STRUCTURE_TYPE_MEMORY_BARRIER, NULL,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ NULL,
VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_HOST_WRITE_BIT,
VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT,
};
@@ -2728,7 +2748,9 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
DoPipelineBarrier(cmd, 1, &meshbufbarrier);
VkBufferCopy bufcopy = {
- 0, 0, bufSize,
+ 0,
+ 0,
+ bufSize,
};
// copy to readback buffer
@@ -3172,7 +3194,9 @@ void VulkanReplay::FetchTessGSOut(uint32_t eventId, VulkanRenderState &state)
m_pDriver->vkGetBufferMemoryRequirements(dev, meshBuffer, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
diff --git a/renderdoc/driver/vulkan/vk_rendermesh.cpp b/renderdoc/driver/vulkan/vk_rendermesh.cpp
index b9208dbd4..b6cfd4bb9 100644
--- a/renderdoc/driver/vulkan/vk_rendermesh.cpp
+++ b/renderdoc/driver/vulkan/vk_rendermesh.cpp
@@ -160,11 +160,17 @@ VKMeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineL
VkVertexInputAttributeDescription vertAttrs[] = {
// primary
{
- 0, 0, primaryFmt, 0,
+ 0,
+ 0,
+ primaryFmt,
+ 0,
},
// secondary
{
- 1, 0, primaryFmt, 0,
+ 1,
+ 0,
+ primaryFmt,
+ 0,
},
};
@@ -194,7 +200,9 @@ VKMeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineL
};
VkPipelineInputAssemblyStateCreateInfo ia = {
- VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, NULL, 0,
+ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
+ NULL,
+ 0,
primary.topology >= Topology::PatchList ? VK_PRIMITIVE_TOPOLOGY_POINT_LIST
: MakeVkPrimitiveTopology(primary.topology),
false,
@@ -268,7 +276,8 @@ VKMeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineL
VK_LOGIC_OP_NO_OP,
1,
&attState,
- {1.0f, 1.0f, 1.0f, 1.0f}};
+ {1.0f, 1.0f, 1.0f, 1.0f},
+ };
VkDynamicState dynstates[] = {VK_DYNAMIC_STATE_VIEWPORT};
@@ -470,7 +479,8 @@ void VulkanReplay::RenderMesh(uint32_t eventId, const rdcarray &seco
Unwrap(outw.rpdepth),
Unwrap(outw.fbdepth),
{{
- 0, 0,
+ 0,
+ 0,
},
{m_DebugWidth, m_DebugHeight}},
0,
@@ -1155,7 +1165,10 @@ void VulkanReplay::RenderMesh(uint32_t eventId, const rdcarray &seco
cache = GetDebugManager()->CacheMeshDisplayPipelines(m_MeshRender.PipeLayout, helper, helper);
FloatVector vertSprite[4] = {
- activeVertex, activeVertex, activeVertex, activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
+ activeVertex,
};
vt->CmdBindDescriptorSets(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS,
diff --git a/renderdoc/driver/vulkan/vk_rendertext.cpp b/renderdoc/driver/vulkan/vk_rendertext.cpp
index 4d76a4aff..9b0bf9faf 100644
--- a/renderdoc/driver/vulkan/vk_rendertext.cpp
+++ b/renderdoc/driver/vulkan/vk_rendertext.cpp
@@ -185,7 +185,8 @@ VulkanTextRenderer::VulkanTextRenderer(WrappedVulkan *driver)
VK_LOGIC_OP_NO_OP,
1,
&attState,
- {1.0f, 1.0f, 1.0f, 1.0f}};
+ {1.0f, 1.0f, 1.0f, 1.0f},
+ };
VkDynamicState dynstates[] = {VK_DYNAMIC_STATE_VIEWPORT};
@@ -363,7 +364,9 @@ VulkanTextRenderer::VulkanTextRenderer(WrappedVulkan *driver)
// allocate readback memory
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
driver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -480,7 +483,9 @@ VulkanTextRenderer::VulkanTextRenderer(WrappedVulkan *driver)
0,
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
{FONT_TEX_WIDTH, FONT_TEX_HEIGHT, 1},
};
@@ -573,7 +578,8 @@ void VulkanTextRenderer::BeginText(const TextPrintState &textstate)
Unwrap(textstate.rp),
Unwrap(textstate.fb),
{{
- 0, 0,
+ 0,
+ 0,
},
{textstate.w, textstate.h}},
1,
diff --git a/renderdoc/driver/vulkan/vk_rendertexture.cpp b/renderdoc/driver/vulkan/vk_rendertexture.cpp
index 64ee823de..695b98b79 100644
--- a/renderdoc/driver/vulkan/vk_rendertexture.cpp
+++ b/renderdoc/driver/vulkan/vk_rendertexture.cpp
@@ -72,7 +72,10 @@ void VulkanReplay::CreateTexImageView(VkImage liveIm, const VulkanCreationInfo::
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, RDCMAX(1U, iminfo.mipLevels), 0,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ RDCMAX(1U, iminfo.mipLevels),
+ 0,
RDCMAX(1U, iminfo.arrayLayers),
},
};
@@ -150,7 +153,8 @@ bool VulkanReplay::RenderTexture(TextureDisplay cfg)
Unwrap(outw.rp),
Unwrap(outw.fb),
{{
- 0, 0,
+ 0,
+ 0,
},
{m_DebugWidth, m_DebugHeight}},
0,
diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp
index ed2a588e2..c203684d2 100644
--- a/renderdoc/driver/vulkan/vk_replay.cpp
+++ b/renderdoc/driver/vulkan/vk_replay.cpp
@@ -480,7 +480,9 @@ void VulkanReplay::CachePipelineExecutables(ResourceId pipeline)
VkPipeline pipe = m_pDriver->GetResourceManager()->GetCurrentHandle(pipeline);
VkPipelineInfoKHR pipeInfo = {
- VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, NULL, Unwrap(pipe),
+ VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR,
+ NULL,
+ Unwrap(pipe),
};
VkDevice dev = m_pDriver->GetDev();
@@ -508,7 +510,10 @@ void VulkanReplay::CachePipelineExecutables(ResourceId pipeline)
rdcarray &irs = out.representations;
VkPipelineExecutableInfoKHR pipeExecInfo = {
- VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR, NULL, Unwrap(pipe), i,
+ VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR,
+ NULL,
+ Unwrap(pipe),
+ i,
};
// enumerate statistics
@@ -758,7 +763,8 @@ void VulkanReplay::RenderCheckerboard(FloatVector dark, FloatVector light)
Unwrap(outw.rp),
Unwrap(outw.fb),
{{
- 0, 0,
+ 0,
+ 0,
},
{m_DebugWidth, m_DebugHeight}},
0,
@@ -811,7 +817,8 @@ void VulkanReplay::RenderCheckerboard(FloatVector dark, FloatVector light)
VkClearAttachment darkCol = {VK_IMAGE_ASPECT_COLOR_BIT, 0, {{{dark.x, dark.y, dark.z, dark.w}}}};
VkClearRect fullRect = {{
- {0, 0}, {outw.width, outw.height},
+ {0, 0},
+ {outw.width, outw.height},
},
0,
1};
@@ -825,7 +832,8 @@ void VulkanReplay::RenderCheckerboard(FloatVector dark, FloatVector light)
for(int32_t x = 0; x < (int32_t)outw.width; x += 128)
{
VkClearRect square = {{
- {x, y}, {64, 64},
+ {x, y},
+ {64, 64},
},
0,
1};
@@ -883,7 +891,8 @@ void VulkanReplay::RenderHighlightBox(float w, float h, float scale)
Unwrap(outw.rp),
Unwrap(outw.fb),
{{
- 0, 0,
+ 0,
+ 0,
},
{m_DebugWidth, m_DebugHeight}},
0,
@@ -900,22 +909,26 @@ void VulkanReplay::RenderHighlightBox(float w, float h, float scale)
VkClearRect rect[4] = {
{{
- {tl.x, tl.y}, {1, sz},
+ {tl.x, tl.y},
+ {1, sz},
},
0,
1},
{{
- {tl.x + (int32_t)sz, tl.y}, {1, sz + 1},
+ {tl.x + (int32_t)sz, tl.y},
+ {1, sz + 1},
},
0,
1},
{{
- {tl.x, tl.y}, {sz, 1},
+ {tl.x, tl.y},
+ {sz, 1},
},
0,
1},
{{
- {tl.x, tl.y + (int32_t)sz}, {sz, 1},
+ {tl.x, tl.y + (int32_t)sz},
+ {sz, 1},
},
0,
1},
@@ -1860,11 +1873,13 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
{
rdcarray *dsts[] = {
- &ret.graphics.descriptorSets, &ret.compute.descriptorSets,
+ &ret.graphics.descriptorSets,
+ &ret.compute.descriptorSets,
};
const rdcarray *srcs[] = {
- &state.graphics.descSets, &state.compute.descSets,
+ &state.graphics.descSets,
+ &state.compute.descSets,
};
const VKDynamicShaderFeedback &usage = m_BindlessFeedback.Usage[eventId];
@@ -2446,7 +2461,8 @@ void VulkanReplay::PickPixel(ResourceId texture, uint32_t x, uint32_t y, const S
Unwrap(m_PixelPick.RP),
Unwrap(m_PixelPick.FB),
{{
- 0, 0,
+ 0,
+ 0,
},
{1, 1}},
1,
@@ -2581,7 +2597,8 @@ bool VulkanReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType
// for depth/stencil we need to run the code twice - once to fetch depth and once to fetch
// stencil - since we can't process float depth and int stencil at the same time
Vec4f depth[2] = {
- {0.0f, 0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f, 1.0f},
+ {0.0f, 0.0f, 0.0f, 0.0f},
+ {1.0f, 1.0f, 1.0f, 1.0f},
};
Vec4u stencil[2] = {{0, 0, 0, 0}, {1, 1, 1, 1}};
@@ -2879,7 +2896,9 @@ bool VulkanReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType
DoPipelineBarrier(cmd, 1, &tilebarrier);
VkBufferCopy bufcopy = {
- 0, 0, m_Histogram.m_MinMaxResult.totalsize,
+ 0,
+ 0,
+ m_Histogram.m_MinMaxResult.totalsize,
};
vt->CmdCopyBuffer(Unwrap(cmd), Unwrap(m_Histogram.m_MinMaxResult.buf),
@@ -3196,7 +3215,9 @@ bool VulkanReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompTy
DoPipelineBarrier(cmd, 1, &tilebarrier);
VkBufferCopy bufcopy = {
- 0, 0, m_Histogram.m_HistogramBuf.totalsize,
+ 0,
+ 0,
+ m_Histogram.m_HistogramBuf.totalsize,
};
vt->CmdCopyBuffer(Unwrap(cmd), Unwrap(m_Histogram.m_HistogramBuf.buf),
@@ -3437,7 +3458,9 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
vt->GetImageMemoryRequirements(Unwrap(dev), tmpImage, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -3557,7 +3580,11 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},
{
- VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, i, 1,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ 0,
+ VK_REMAINING_MIP_LEVELS,
+ i,
+ 1,
},
};
@@ -3588,7 +3615,8 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
tmpRP,
tmpFB[i],
{{
- 0, 0,
+ 0,
+ 0,
},
{imCreateInfo.extent.width, imCreateInfo.extent.height}},
1,
@@ -3687,7 +3715,9 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
vt->GetImageMemoryRequirements(Unwrap(dev), tmpImage, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
@@ -3765,10 +3795,14 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
imCreateInfo.format, s.mip);
// buffer size needs to be align to the int for shader writing
- VkBufferCreateInfo bufInfo = {VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0,
- AlignUp(dataSize, 4U), VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
- VK_BUFFER_USAGE_TRANSFER_DST_BIT};
+ VkBufferCreateInfo bufInfo = {
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ NULL,
+ 0,
+ AlignUp(dataSize, 4U),
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
+ VK_BUFFER_USAGE_TRANSFER_DST_BIT,
+ };
vkr = vt->CreateBuffer(Unwrap(dev), &bufInfo, NULL, &readbackBuf);
CheckVkResult(vkr);
@@ -3778,7 +3812,9 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
vt->GetBufferMemoryRequirements(Unwrap(dev), readbackBuf, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetReadbackMemoryIndex(mrq.memoryTypeBits),
};
vkr = vt->AllocateMemory(Unwrap(dev), &allocInfo, NULL, &readbackMem);
@@ -3852,7 +3888,9 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
0,
{VK_IMAGE_ASPECT_NONE, s.mip, s.slice, 1},
{
- 0, 0, 0,
+ 0,
+ 0,
+ 0,
},
{RDCMAX(1U, imCreateInfo.extent.width >> s.mip),
RDCMAX(1U, imCreateInfo.extent.height >> s.mip),
@@ -3932,7 +3970,9 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
vt->GetBufferMemoryRequirements(Unwrap(dev), readbackBuf, &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
m_pDriver->GetReadbackMemoryIndex(mrq.memoryTypeBits),
};
vkr = vt->AllocateMemory(Unwrap(dev), &allocInfo, NULL, &readbackMem);
@@ -4261,7 +4301,8 @@ ResourceId VulkanReplay::ApplyCustomShader(TextureDisplay &display)
Unwrap(GetDebugManager()->GetCustomRenderpass()),
Unwrap(GetDebugManager()->GetCustomFramebuffer()),
{{
- 0, 0,
+ 0,
+ 0,
},
{RDCMAX(1U, iminfo.extent.width >> display.subresource.mip),
RDCMAX(1U, iminfo.extent.height >> display.subresource.mip)}},
diff --git a/renderdoc/driver/vulkan/vk_resources.cpp b/renderdoc/driver/vulkan/vk_resources.cpp
index 487212462..ad3db863e 100644
--- a/renderdoc/driver/vulkan/vk_resources.cpp
+++ b/renderdoc/driver/vulkan/vk_resources.cpp
@@ -1549,8 +1549,7 @@ BlockShape GetBlockShape(VkFormat Format, uint32_t plane)
case VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:
case VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:
case VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:
- case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:
- return {4, 4, 8};
+ case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG: return {4, 4, 8};
/*
* YUV planar/packed subsampled textures.
@@ -4689,12 +4688,22 @@ TEST_CASE("Vulkan formats", "[format][vulkan]")
int i = 0;
for(VkFormat f : {
- VK_FORMAT_BC1_RGB_UNORM_BLOCK, VK_FORMAT_BC1_RGB_SRGB_BLOCK,
- VK_FORMAT_BC1_RGBA_UNORM_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK,
- VK_FORMAT_BC2_UNORM_BLOCK, VK_FORMAT_BC2_SRGB_BLOCK, VK_FORMAT_BC3_UNORM_BLOCK,
- VK_FORMAT_BC3_SRGB_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK,
- VK_FORMAT_BC5_UNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK, VK_FORMAT_BC6H_UFLOAT_BLOCK,
- VK_FORMAT_BC6H_SFLOAT_BLOCK, VK_FORMAT_BC7_UNORM_BLOCK, VK_FORMAT_BC7_SRGB_BLOCK,
+ VK_FORMAT_BC1_RGB_UNORM_BLOCK,
+ VK_FORMAT_BC1_RGB_SRGB_BLOCK,
+ VK_FORMAT_BC1_RGBA_UNORM_BLOCK,
+ VK_FORMAT_BC1_RGBA_SRGB_BLOCK,
+ VK_FORMAT_BC2_UNORM_BLOCK,
+ VK_FORMAT_BC2_SRGB_BLOCK,
+ VK_FORMAT_BC3_UNORM_BLOCK,
+ VK_FORMAT_BC3_SRGB_BLOCK,
+ VK_FORMAT_BC4_UNORM_BLOCK,
+ VK_FORMAT_BC4_SNORM_BLOCK,
+ VK_FORMAT_BC5_UNORM_BLOCK,
+ VK_FORMAT_BC5_SNORM_BLOCK,
+ VK_FORMAT_BC6H_UFLOAT_BLOCK,
+ VK_FORMAT_BC6H_SFLOAT_BLOCK,
+ VK_FORMAT_BC7_UNORM_BLOCK,
+ VK_FORMAT_BC7_SRGB_BLOCK,
})
{
INFO("Format is " << ToStr(f));
diff --git a/renderdoc/driver/vulkan/vk_resources.h b/renderdoc/driver/vulkan/vk_resources.h
index ddd78127a..2f79f9886 100644
--- a/renderdoc/driver/vulkan/vk_resources.h
+++ b/renderdoc/driver/vulkan/vk_resources.h
@@ -586,24 +586,27 @@ struct UnwrapHelper
{
};
-#define UNWRAP_HELPER(vulkantype) \
- template <> \
- struct UnwrapHelper \
- { \
- typedef WrappedVkDispRes ParentType; \
- enum \
- { \
- DispatchableType = 1 \
- }; \
- typedef CONCAT(Wrapped, vulkantype) Outer; \
- static TypedRealHandle ToTypedHandle(vulkantype real) \
- { \
- TypedRealHandle h; \
- h.type = (VkResourceType)Outer::TypeEnum; \
- h.real = RealVkRes((void *)real); \
- return h; \
- } \
- static Outer *FromHandle(vulkantype wrapped) { return (Outer *)wrapped; } \
+#define UNWRAP_HELPER(vulkantype) \
+ template <> \
+ struct UnwrapHelper \
+ { \
+ typedef WrappedVkDispRes ParentType; \
+ enum \
+ { \
+ DispatchableType = 1 \
+ }; \
+ typedef CONCAT(Wrapped, vulkantype) Outer; \
+ static TypedRealHandle ToTypedHandle(vulkantype real) \
+ { \
+ TypedRealHandle h; \
+ h.type = (VkResourceType)Outer::TypeEnum; \
+ h.real = RealVkRes((void *)real); \
+ return h; \
+ } \
+ static Outer *FromHandle(vulkantype wrapped) \
+ { \
+ return (Outer *)wrapped; \
+ } \
};
#define UNWRAP_NONDISP_HELPER(vulkantype) \
diff --git a/renderdoc/driver/vulkan/vk_serialise.cpp b/renderdoc/driver/vulkan/vk_serialise.cpp
index 70ef52349..87b7271b8 100644
--- a/renderdoc/driver/vulkan/vk_serialise.cpp
+++ b/renderdoc/driver/vulkan/vk_serialise.cpp
@@ -171,9 +171,8 @@ DECL_VKFLAG_EXT(VkPresentGravity, EXT);
// serialise a member as flags - cast to the Bits enum for serialisation so the stringification
// picks up the bitfield and doesn't treat it as uint32_t. Then we rename the type back to the base
// flags type so the structured data is as accurate as possible.
-#define SERIALISE_MEMBER_VKFLAGS(flagstype, name) \
- SERIALISE_MEMBER_TYPED(CONCAT(flagstype, Bits), name) \
- .TypedAs(STRING_LITERAL(STRINGIZE(flagstype)))
+#define SERIALISE_MEMBER_VKFLAGS(flagstype, name) \
+ SERIALISE_MEMBER_TYPED(CONCAT(flagstype, Bits), name).TypedAs(STRING_LITERAL(STRINGIZE(flagstype)))
#define SERIALISE_MEMBER_ARRAY_VKFLAGS(flagstype, name, count) \
SERIALISE_MEMBER_ARRAY_TYPED(CONCAT(flagstype, Bits), name, count) \
@@ -5287,13 +5286,13 @@ void DoSerialise(SerialiserType &ser, VkDescriptorUpdateTemplateEntry &el)
SERIALISE_MEMBER(descriptorCount);
SERIALISE_MEMBER(descriptorType);
-// these fields are size_t and should not be serialised as-is. They're not used so we can just
-// serialise them as uint64_t. Unfortunately this wasn't correct initially and they were
-// serialised as-is making a 32-bit/64-bit incompatibility, so for older versions all we can do is
-// continue to serialise them as size_t as it's impossible to know which one was used.
-//
-// On mac we can't compile a size_t serialise, which is good in general but makes this backwards
-// compatibility a bit more annoying. We just assume a 64-bit capture.
+ // these fields are size_t and should not be serialised as-is. They're not used so we can just
+ // serialise them as uint64_t. Unfortunately this wasn't correct initially and they were
+ // serialised as-is making a 32-bit/64-bit incompatibility, so for older versions all we can do is
+ // continue to serialise them as size_t as it's impossible to know which one was used.
+ //
+ // On mac we can't compile a size_t serialise, which is good in general but makes this backwards
+ // compatibility a bit more annoying. We just assume a 64-bit capture.
#if DISABLED(RDOC_APPLE)
if(ser.VersionAtLeast(0xE))
diff --git a/renderdoc/driver/vulkan/vk_shader_feedback.cpp b/renderdoc/driver/vulkan/vk_shader_feedback.cpp
index f7fbf7703..eef6cf266 100644
--- a/renderdoc/driver/vulkan/vk_shader_feedback.cpp
+++ b/renderdoc/driver/vulkan/vk_shader_feedback.cpp
@@ -642,8 +642,8 @@ void AnnotateShader(const ShaderReflection &refl, const SPIRVPatchData &patchDat
rdcarray idxs;
auto fetchOrAddGlobalInput = [&editor, &idxs, &refl, &patchData, &locationGather, &newGlobals](
- const char *name, ShaderBuiltin builtin, rdcspv::BuiltIn spvBuiltin, rdcspv::Id varType,
- bool integer) {
+ const char *name, ShaderBuiltin builtin,
+ rdcspv::BuiltIn spvBuiltin, rdcspv::Id varType, bool integer) {
rdcspv::Id ret;
rdcspv::Id ptrType = editor.DeclareType(rdcspv::Pointer(varType, rdcspv::StorageClass::Input));
@@ -1681,7 +1681,9 @@ bool VulkanReplay::FetchShaderFeedback(uint32_t eventId)
VkDescriptorSetLayoutBinding newBindings[] = {
// output buffer
{
- 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1,
+ 0,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ 1,
VkShaderStageFlags(result.compute ? VK_SHADER_STAGE_COMPUTE_BIT
: VK_SHADER_STAGE_ALL_GRAPHICS),
NULL,
diff --git a/renderdoc/driver/vulkan/vk_shaderdebug.cpp b/renderdoc/driver/vulkan/vk_shaderdebug.cpp
index 3cffb23d0..3aa73ceab 100644
--- a/renderdoc/driver/vulkan/vk_shaderdebug.cpp
+++ b/renderdoc/driver/vulkan/vk_shaderdebug.cpp
@@ -1229,19 +1229,40 @@ public:
VkWriteDescriptorSet writeSets[] = {
{
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, NULL, Unwrap(m_DebugData.DescSet),
- (uint32_t)ShaderDebugBind::Constants, 0, 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, NULL,
- &uniformWriteInfo, NULL,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ NULL,
+ Unwrap(m_DebugData.DescSet),
+ (uint32_t)ShaderDebugBind::Constants,
+ 0,
+ 1,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
+ NULL,
+ &uniformWriteInfo,
+ NULL,
},
{
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, NULL, Unwrap(m_DebugData.DescSet),
- (uint32_t)constParams.dim, 0, 1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, &imageWriteInfo,
- NULL, NULL,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ NULL,
+ Unwrap(m_DebugData.DescSet),
+ (uint32_t)constParams.dim,
+ 0,
+ 1,
+ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
+ &imageWriteInfo,
+ NULL,
+ NULL,
},
{
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, NULL, Unwrap(m_DebugData.DescSet),
- (uint32_t)ShaderDebugBind::Sampler, 0, 1, VK_DESCRIPTOR_TYPE_SAMPLER, &samplerWriteInfo,
- NULL, NULL,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ NULL,
+ Unwrap(m_DebugData.DescSet),
+ (uint32_t)ShaderDebugBind::Sampler,
+ 0,
+ 1,
+ VK_DESCRIPTOR_TYPE_SAMPLER,
+ &samplerWriteInfo,
+ NULL,
+ NULL,
},
};
@@ -1409,9 +1430,16 @@ public:
VkWriteDescriptorSet writeSets[] = {
{
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, NULL, Unwrap(m_DebugData.DescSet),
- (uint32_t)ShaderDebugBind::MathResult, 0, 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, NULL,
- &storageWriteInfo, NULL,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ NULL,
+ Unwrap(m_DebugData.DescSet),
+ (uint32_t)ShaderDebugBind::MathResult,
+ 0,
+ 1,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ NULL,
+ &storageWriteInfo,
+ NULL,
},
};
@@ -1851,7 +1879,10 @@ private:
};
const VkPipelineMultisampleStateCreateInfo msaa = {
- VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, NULL, 0, VK_SAMPLE_COUNT_1_BIT,
+ VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
+ NULL,
+ 0,
+ VK_SAMPLE_COUNT_1_BIT,
};
const VkPipelineDepthStencilStateCreateInfo depthStencil = {
@@ -2027,8 +2058,10 @@ private:
func.add(rdcspv::OpLabel(editor.MakeId()));
rdcspv::Id consts[] = {
- editor.AddConstantImmediate(0), editor.AddConstantImmediate(1),
- editor.AddConstantImmediate(2), editor.AddConstantImmediate(3),
+ editor.AddConstantImmediate(0),
+ editor.AddConstantImmediate(1),
+ editor.AddConstantImmediate(2),
+ editor.AddConstantImmediate(3),
};
rdcspv::Id zerof;
@@ -4355,20 +4388,28 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
VkSpecializationMapEntry specMaps[] = {
{
- (uint32_t)InputSpecConstant::Address, offsetof(SpecData, bufferAddress), sizeof(uint32_t),
+ (uint32_t)InputSpecConstant::Address,
+ offsetof(SpecData, bufferAddress),
+ sizeof(uint32_t),
},
{
- (uint32_t)InputSpecConstant::ArrayLength, offsetof(SpecData, arrayLength),
+ (uint32_t)InputSpecConstant::ArrayLength,
+ offsetof(SpecData, arrayLength),
sizeof(SpecData::arrayLength),
},
{
- (uint32_t)InputSpecConstant::DestX, offsetof(SpecData, destX), sizeof(SpecData::destX),
+ (uint32_t)InputSpecConstant::DestX,
+ offsetof(SpecData, destX),
+ sizeof(SpecData::destX),
},
{
- (uint32_t)InputSpecConstant::DestY, offsetof(SpecData, destY), sizeof(SpecData::destY),
+ (uint32_t)InputSpecConstant::DestY,
+ offsetof(SpecData, destY),
+ sizeof(SpecData::destY),
},
{
- (uint32_t)InputSpecConstant::AddressMSB, offsetof(SpecData, bufferAddress) + 4,
+ (uint32_t)InputSpecConstant::AddressMSB,
+ offsetof(SpecData, bufferAddress) + 4,
sizeof(uint32_t),
},
};
diff --git a/renderdoc/driver/vulkan/vk_state.cpp b/renderdoc/driver/vulkan/vk_state.cpp
index c12f8faea..792ed8e5a 100644
--- a/renderdoc/driver/vulkan/vk_state.cpp
+++ b/renderdoc/driver/vulkan/vk_state.cpp
@@ -95,8 +95,10 @@ void setupRenderingInfo(const VulkanRenderState::DynamicRendering &dynamicRender
}
structs->fragmentDensity = {
- VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT, NULL,
- Unwrap(dynamicRendering.fragmentDensityView), dynamicRendering.fragmentDensityLayout,
+ VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT,
+ NULL,
+ Unwrap(dynamicRendering.fragmentDensityView),
+ dynamicRendering.fragmentDensityLayout,
};
if(dynamicRendering.fragmentDensityView != VK_NULL_HANDLE)
@@ -120,8 +122,10 @@ void setupRenderingInfo(const VulkanRenderState::DynamicRendering &dynamicRender
}
structs->tileOnlyMSAA = {
- VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT, NULL,
- dynamicRendering.tileOnlyMSAAEnable, dynamicRendering.tileOnlyMSAASampleCount,
+ VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT,
+ NULL,
+ dynamicRendering.tileOnlyMSAAEnable,
+ dynamicRendering.tileOnlyMSAASampleCount,
};
if(dynamicRendering.tileOnlyMSAAEnable)
diff --git a/renderdoc/driver/vulkan/vk_state.h b/renderdoc/driver/vulkan/vk_state.h
index 3cc591fe5..a1efa0623 100644
--- a/renderdoc/driver/vulkan/vk_state.h
+++ b/renderdoc/driver/vulkan/vk_state.h
@@ -245,7 +245,8 @@ struct VulkanRenderState
// shading rate
VkExtent2D pipelineShadingRate = {1, 1};
VkFragmentShadingRateCombinerOpKHR shadingRateCombiners[2] = {
- VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR,
+ VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR,
+ VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR,
};
// attachment feedback loop
diff --git a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp
index 41390d2cc..5055ee5e2 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp
@@ -572,8 +572,8 @@ rdcstr WrappedVulkan::MakeRenderPassOpString(bool store)
if(atts[dsAttach].storeOp == atts[dsAttach].stencilStoreOp)
opDesc += "DS=" + ToHumanStr(atts[dsAttach].storeOp);
else
- opDesc += "D=" + ToHumanStr(atts[dsAttach].storeOp) + ", S=" +
- ToHumanStr(atts[dsAttach].stencilStoreOp);
+ opDesc += "D=" + ToHumanStr(atts[dsAttach].storeOp) +
+ ", S=" + ToHumanStr(atts[dsAttach].stencilStoreOp);
}
else
{
@@ -581,8 +581,8 @@ rdcstr WrappedVulkan::MakeRenderPassOpString(bool store)
if(atts[dsAttach].loadOp == atts[dsAttach].stencilLoadOp)
opDesc += "DS=" + ToHumanStr(atts[dsAttach].loadOp);
else
- opDesc += "D=" + ToHumanStr(atts[dsAttach].loadOp) + ", S=" +
- ToHumanStr(atts[dsAttach].stencilLoadOp);
+ opDesc += "D=" + ToHumanStr(atts[dsAttach].loadOp) +
+ ", S=" + ToHumanStr(atts[dsAttach].stencilLoadOp);
}
}
}
@@ -1528,7 +1528,8 @@ bool WrappedVulkan::Serialise_vkEndCommandBuffer(SerialiserType &ser, VkCommandB
info.pColorAttachments = renderstate.dynamicRendering.color.data();
VkRenderingFragmentDensityMapAttachmentInfoEXT fragmentDensity = {
- VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT, NULL,
+ VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT,
+ NULL,
renderstate.dynamicRendering.fragmentDensityView,
renderstate.dynamicRendering.fragmentDensityLayout,
};
@@ -1554,7 +1555,8 @@ bool WrappedVulkan::Serialise_vkEndCommandBuffer(SerialiserType &ser, VkCommandB
}
VkMultisampledRenderToSingleSampledInfoEXT tileOnlyMSAA = {
- VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT, NULL,
+ VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT,
+ NULL,
renderstate.dynamicRendering.tileOnlyMSAAEnable,
renderstate.dynamicRendering.tileOnlyMSAASampleCount,
};
@@ -3798,9 +3800,7 @@ bool WrappedVulkan::Serialise_vkCmdPushConstants(SerialiserType &ser, VkCommandB
{
SERIALISE_ELEMENT(commandBuffer);
SERIALISE_ELEMENT(layout);
- SERIALISE_ELEMENT_TYPED(VkShaderStageFlagBits, stageFlags)
- .TypedAs("VkShaderStageFlags"_lit)
- .Important();
+ SERIALISE_ELEMENT_TYPED(VkShaderStageFlagBits, stageFlags).TypedAs("VkShaderStageFlags"_lit).Important();
SERIALISE_ELEMENT(start);
SERIALISE_ELEMENT(length);
SERIALISE_ELEMENT_ARRAY(values, length).Important();
diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
index a9c9e6c8c..a47e7c531 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
@@ -3717,8 +3717,10 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
ImageBarrierSequence::SetMaxQueueFamilyIndex(qidx);
VkCommandPoolCreateInfo poolInfo = {
- VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, NULL,
- VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, qidx,
+ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
+ NULL,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
+ qidx,
};
vkr = ObjDisp(device)->CreateCommandPool(Unwrap(device), &poolInfo, NULL,
&m_ExternalQueues[qidx].pool);
@@ -4165,8 +4167,10 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice,
ImageBarrierSequence::SetMaxQueueFamilyIndex(qidx);
VkCommandPoolCreateInfo poolInfo = {
- VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, NULL,
- VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, qidx,
+ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
+ NULL,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
+ qidx,
};
vkr = ObjDisp(device)->CreateCommandPool(Unwrap(device), &poolInfo, NULL,
&m_ExternalQueues[qidx].pool);
diff --git a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp
index 1ee6d6925..333dc76f3 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp
@@ -2400,10 +2400,9 @@ bool WrappedVulkan::Serialise_vkCmdClearDepthStencilImage(
->CmdClearDepthStencilImage(Unwrap(commandBuffer), Unwrap(image), imageLayout,
&DepthStencil, rangeCount, pRanges);
- if(eventId &&
- m_ActionCallback->PostMisc(
- eventId, ActionFlags(ActionFlags::Clear | ActionFlags::ClearDepthStencil),
- commandBuffer))
+ if(eventId && m_ActionCallback->PostMisc(
+ eventId, ActionFlags(ActionFlags::Clear | ActionFlags::ClearDepthStencil),
+ commandBuffer))
{
ObjDisp(commandBuffer)
->CmdClearDepthStencilImage(Unwrap(commandBuffer), Unwrap(image), imageLayout,
diff --git a/renderdoc/driver/vulkan/wrappers/vk_dynamic_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_dynamic_funcs.cpp
index 9022b5f22..976dd0109 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_dynamic_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_dynamic_funcs.cpp
@@ -539,9 +539,7 @@ bool WrappedVulkan::Serialise_vkCmdSetStencilCompareMask(SerialiserType &ser,
uint32_t compareMask)
{
SERIALISE_ELEMENT(commandBuffer);
- SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask)
- .TypedAs("VkStencilFaceFlags"_lit)
- .Important();
+ SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask).TypedAs("VkStencilFaceFlags"_lit).Important();
SERIALISE_ELEMENT(compareMask).Important();
Serialise_DebugMessages(ser);
@@ -607,9 +605,7 @@ bool WrappedVulkan::Serialise_vkCmdSetStencilWriteMask(SerialiserType &ser,
uint32_t writeMask)
{
SERIALISE_ELEMENT(commandBuffer);
- SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask)
- .TypedAs("VkStencilFaceFlags"_lit)
- .Important();
+ SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask).TypedAs("VkStencilFaceFlags"_lit).Important();
SERIALISE_ELEMENT(writeMask).Important();
Serialise_DebugMessages(ser);
@@ -675,9 +671,7 @@ bool WrappedVulkan::Serialise_vkCmdSetStencilReference(SerialiserType &ser,
uint32_t reference)
{
SERIALISE_ELEMENT(commandBuffer);
- SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask)
- .TypedAs("VkStencilFaceFlags"_lit)
- .Important();
+ SERIALISE_ELEMENT_TYPED(VkStencilFaceFlagBits, faceMask).TypedAs("VkStencilFaceFlags"_lit).Important();
SERIALISE_ELEMENT(reference).Important();
Serialise_DebugMessages(ser);
@@ -742,9 +736,7 @@ bool WrappedVulkan::Serialise_vkCmdSetSampleLocationsEXT(
const VkSampleLocationsInfoEXT *pSampleLocationsInfo)
{
SERIALISE_ELEMENT(commandBuffer);
- SERIALISE_ELEMENT_LOCAL(sampleInfo, *pSampleLocationsInfo)
- .Named("pSampleLocationsInfo"_lit)
- .Important();
+ SERIALISE_ELEMENT_LOCAL(sampleInfo, *pSampleLocationsInfo).Named("pSampleLocationsInfo"_lit).Important();
Serialise_DebugMessages(ser);
diff --git a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp
index a648a5372..fffa02bc7 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp
@@ -2028,9 +2028,7 @@ static ObjData GetObjData(VkObjectType objType, uint64_t object)
// VkDisplayKHR, VkDisplayModeKHR, and VkValidationCacheEXT are not wrapped
case VK_OBJECT_TYPE_DISPLAY_KHR:
case VK_OBJECT_TYPE_DISPLAY_MODE_KHR:
- case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT:
- ret.unwrapped = object;
- break;
+ case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT: ret.unwrapped = object; break;
// debug report callback and messenger are not wrapped in the conventional way
case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT:
@@ -2048,9 +2046,7 @@ static ObjData GetObjData(VkObjectType objType, uint64_t object)
}
// private data slots are not wrapped
- case VK_OBJECT_TYPE_PRIVATE_DATA_SLOT:
- ret.unwrapped = object;
- break;
+ case VK_OBJECT_TYPE_PRIVATE_DATA_SLOT: ret.unwrapped = object; break;
// these objects are not supported
case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR:
diff --git a/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp
index 1448b3681..53249aec6 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp
@@ -639,7 +639,9 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
if(memFlags && (memFlags->flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT))
{
VkDeviceMemoryOpaqueCaptureAddressInfo getInfo = {
- VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, NULL, Unwrap(*pMemory),
+ VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO,
+ NULL,
+ Unwrap(*pMemory),
};
memoryDeviceAddress.opaqueCaptureAddress =
@@ -1415,7 +1417,9 @@ bool WrappedVulkan::Serialise_vkBindBufferMemory(SerialiserType &ser, VkDevice d
if(bufInfo.usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT)
{
VkBufferDeviceAddressInfo getInfo = {
- VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, NULL, Unwrap(buffer),
+ VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
+ NULL,
+ Unwrap(buffer),
};
RDCCOMPILE_ASSERT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO ==
@@ -1755,7 +1759,9 @@ VkResult WrappedVulkan::vkCreateBuffer(VkDevice device, const VkBufferCreateInfo
if((pCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) != 0)
{
VkBufferDeviceAddressInfo getInfo = {
- VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, NULL, Unwrap(*pBuffer),
+ VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
+ NULL,
+ Unwrap(*pBuffer),
};
if(GetExtensions(GetRecord(device)).ext_KHR_buffer_device_address)
@@ -2825,7 +2831,9 @@ bool WrappedVulkan::Serialise_vkBindBufferMemory2(SerialiserType &ser, VkDevice
if(bufInfo.usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT)
{
VkBufferDeviceAddressInfo getInfo = {
- VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, NULL, Unwrap(bindInfo.buffer),
+ VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
+ NULL,
+ Unwrap(bindInfo.buffer),
};
if(GetExtensions(GetRecord(device)).ext_KHR_buffer_device_address)
diff --git a/renderdoc/driver/vulkan/wrappers/vk_sync_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_sync_funcs.cpp
index 20942bb2b..82d93e10f 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_sync_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_sync_funcs.cpp
@@ -822,7 +822,9 @@ bool WrappedVulkan::Serialise_vkCmdWaitEvents(
// see top of this file for current event/fence handling
VkEventCreateInfo evInfo = {
- VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, NULL, 0,
+ VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
+ NULL,
+ 0,
};
if(IsActiveReplaying(m_State))
@@ -1347,7 +1349,9 @@ bool WrappedVulkan::Serialise_vkCmdWaitEvents2(SerialiserType &ser, VkCommandBuf
if(commandBuffer != VK_NULL_HANDLE)
{
VkEventCreateInfo evInfo = {
- VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, NULL, 0,
+ VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
+ NULL,
+ 0,
};
// don't wrap this event
diff --git a/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp
index e5024d51a..448d360ed 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp
@@ -152,7 +152,9 @@ VkResult WrappedVulkan::vkRegisterDeviceEventEXT(VkDevice device,
CACHE_THREAD_SERIALISER();
VkFenceCreateInfo createInfo = {
- VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, VK_FENCE_CREATE_SIGNALED_BIT,
+ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
+ NULL,
+ VK_FENCE_CREATE_SIGNALED_BIT,
};
SCOPED_SERIALISE_CHUNK(VulkanChunk::vkRegisterDeviceEventEXT);
@@ -196,7 +198,9 @@ VkResult WrappedVulkan::vkRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR
CACHE_THREAD_SERIALISER();
VkFenceCreateInfo createInfo = {
- VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, VK_FENCE_CREATE_SIGNALED_BIT,
+ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
+ NULL,
+ VK_FENCE_CREATE_SIGNALED_BIT,
};
SCOPED_SERIALISE_CHUNK(VulkanChunk::vkRegisterDisplayEventEXT);
@@ -421,7 +425,9 @@ bool WrappedVulkan::Serialise_vkCreateSwapchainKHR(SerialiserType &ser, VkDevice
ObjDisp(device)->GetImageMemoryRequirements(Unwrap(device), Unwrap(im), &mrq);
VkMemoryAllocateInfo allocInfo = {
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, mrq.size,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ NULL,
+ mrq.size,
GetGPULocalMemoryIndex(mrq.memoryTypeBits),
};
diff --git a/renderdoc/maths/formatpacking.cpp b/renderdoc/maths/formatpacking.cpp
index c2f185985..16e3ef65d 100644
--- a/renderdoc/maths/formatpacking.cpp
+++ b/renderdoc/maths/formatpacking.cpp
@@ -80,7 +80,9 @@ Vec3f ConvertFromR9G9B9E5(uint32_t data)
{
// get mantissas
uint32_t mantissas[] = {
- ((data >> 0) & 0x1ff), ((data >> 9) & 0x1ff), ((data >> 18) & 0x1ff),
+ ((data >> 0) & 0x1ff),
+ ((data >> 9) & 0x1ff),
+ ((data >> 18) & 0x1ff),
};
// get shared exponent
@@ -155,10 +157,14 @@ uint32_t ConvertToR9G9B9E5(Vec3f data)
Vec3f ConvertFromR11G11B10(uint32_t data)
{
uint32_t mantissas[3] = {
- (data >> 0) & 0x3f, (data >> 11) & 0x3f, (data >> 22) & 0x1f,
+ (data >> 0) & 0x3f,
+ (data >> 11) & 0x3f,
+ (data >> 22) & 0x1f,
};
int32_t exponents[3] = {
- int32_t(data >> 6) & 0x1f, int32_t(data >> 17) & 0x1f, int32_t(data >> 27) & 0x1f,
+ int32_t(data >> 6) & 0x1f,
+ int32_t(data >> 17) & 0x1f,
+ int32_t(data >> 27) & 0x1f,
};
Vec3f ret;
@@ -217,18 +223,26 @@ uint32_t ConvertToR11G11B10(Vec3f data)
{
// convert each component to half first
uint16_t halves[3] = {
- ConvertToHalf(data.x), ConvertToHalf(data.y), ConvertToHalf(data.z),
+ ConvertToHalf(data.x),
+ ConvertToHalf(data.y),
+ ConvertToHalf(data.z),
};
// extract mantissas, exponents, signs
bool signs[3] = {
- (halves[0] & 0x8000) != 0, (halves[1] & 0x8000) != 0, (halves[2] & 0x8000) != 0,
+ (halves[0] & 0x8000) != 0,
+ (halves[1] & 0x8000) != 0,
+ (halves[2] & 0x8000) != 0,
};
uint32_t mantissas[3] = {
- (halves[0] & 0x03FFU), (halves[1] & 0x03FFU), (halves[2] & 0x03FFU),
+ (halves[0] & 0x03FFU),
+ (halves[1] & 0x03FFU),
+ (halves[2] & 0x03FFU),
};
uint32_t exponents[3] = {
- (halves[0] & 0x7C00U) >> 10, (halves[1] & 0x7C00U) >> 10, (halves[2] & 0x7C00U) >> 10,
+ (halves[0] & 0x7C00U) >> 10,
+ (halves[1] & 0x7C00U) >> 10,
+ (halves[2] & 0x7C00U) >> 10,
};
// normalise NaN/inf values so we can truncate mantissa without converting NaN to inf
@@ -1388,10 +1402,7 @@ TEST_CASE("Check format conversion", "[format]")
((uint32_t((re)&0x1f) << 6) | (uint32_t((ge)&0x1f) << 17) | (uint32_t((be)&0x1f) << 27) | \
uint32_t((rm)&0x3f) << 0 | uint32_t((gm)&0x3f) << 11 | uint32_t((bm)&0x1f) << 22)
-#define TEST11(e, m, f) \
- { \
- R11G11B10(e, m, 0, 0, 0, 0), Vec3f(f, 0.0f, 0.0f) \
- }
+#define TEST11(e, m, f) {R11G11B10(e, m, 0, 0, 0, 0), Vec3f(f, 0.0f, 0.0f)}
#define TEST10(e, m, f) \
{ \
R11G11B10(0, 0, 0, 0, e, m), Vec3f(0.0f, 0.0f, f) \
@@ -1493,9 +1504,10 @@ TEST_CASE("Check format conversion", "[format]")
SECTION("Spot test ConvertToR11G11B10")
{
#undef TEST11
-#define TEST11(f, e, m) \
- { \
- Vec3f(f, 0.0f, 0.0f), R11G11B10(e, m, 0, 0, 0, 0), \
+#define TEST11(f, e, m) \
+ { \
+ Vec3f(f, 0.0f, 0.0f), \
+ R11G11B10(e, m, 0, 0, 0, 0), \
}
#undef TEST10
diff --git a/renderdoc/os/posix/android/android_hook.cpp b/renderdoc/os/posix/android/android_hook.cpp
index 2f6032ca6..e96e3c3ca 100644
--- a/renderdoc/os/posix/android/android_hook.cpp
+++ b/renderdoc/os/posix/android/android_hook.cpp
@@ -40,7 +40,7 @@
#include
// uncomment the following to print (very verbose) debugging prints for the android PLT hooking
-//#define HOOK_DEBUG_PRINT(...) RDCLOG(__VA_ARGS__)
+// #define HOOK_DEBUG_PRINT(...) RDCLOG(__VA_ARGS__)
#if !defined(HOOK_DEBUG_PRINT)
#define HOOK_DEBUG_PRINT(...) \
diff --git a/renderdoc/os/posix/linux/linux_process.cpp b/renderdoc/os/posix/linux/linux_process.cpp
index 9757d9e6d..488dfedb9 100644
--- a/renderdoc/os/posix/linux/linux_process.cpp
+++ b/renderdoc/os/posix/linux/linux_process.cpp
@@ -47,8 +47,7 @@
RDOC_CONFIG(bool, Linux_PtraceChildProcesses, true,
"Use ptrace(2) to trace child processes at startup to ensure connection is made as "
"early as possible.");
-RDOC_CONFIG(bool, Linux_Debug_PtraceLogging, false,
- "Enable verbose debug logging of ptrace usage.");
+RDOC_CONFIG(bool, Linux_Debug_PtraceLogging, false, "Enable verbose debug logging of ptrace usage.");
extern char **environ;
diff --git a/renderdoc/os/posix/posix_process.cpp b/renderdoc/os/posix/posix_process.cpp
index 6baca1269..01cc81c8a 100644
--- a/renderdoc/os/posix/posix_process.cpp
+++ b/renderdoc/os/posix/posix_process.cpp
@@ -33,7 +33,6 @@
#include
#include
#include