From ec8f1d51f54f18c8352b9fb21c6491228d54c458 Mon Sep 17 00:00:00 2001 From: widberg Date: Mon, 23 Mar 2026 13:25:56 -0400 Subject: [PATCH] Move alignas Placing `alignas` before the type is more in-line with the C++ standard, Microsoft Learn examples, and other places in this codebase. While the old way worked with MSVC, this is more consistent and improves compatibility with other tools without affecting the MSVC build. --- renderdoc/driver/d3d12/d3d12_common.h | 2 +- util/test/demos/d3d12/d3d12_mesh_shader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_common.h b/renderdoc/driver/d3d12/d3d12_common.h index a74cbe749..078676816 100644 --- a/renderdoc/driver/d3d12/d3d12_common.h +++ b/renderdoc/driver/d3d12/d3d12_common.h @@ -785,7 +785,7 @@ DECLARE_REFLECTION_STRUCT(D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC); // subobject headers have to be aligned to pointer boundaries #define SUBOBJECT_HEADER(subobj) \ - D3D12_PIPELINE_STATE_SUBOBJECT_TYPE alignas(void *) CONCAT(header, subobj) = \ + alignas(void *) D3D12_PIPELINE_STATE_SUBOBJECT_TYPE CONCAT(header, subobj) = \ CONCAT(D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_, subobj); // similar to D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC but a packed version that can be passed diff --git a/util/test/demos/d3d12/d3d12_mesh_shader.cpp b/util/test/demos/d3d12/d3d12_mesh_shader.cpp index 8cee7bcaf..beb71dc90 100644 --- a/util/test/demos/d3d12/d3d12_mesh_shader.cpp +++ b/util/test/demos/d3d12/d3d12_mesh_shader.cpp @@ -26,7 +26,7 @@ // subobject headers have to be aligned to pointer boundaries #define SUBOBJECT_HEADER(subobj) \ - D3D12_PIPELINE_STATE_SUBOBJECT_TYPE alignas(void *) CONCAT(header, subobj) = \ + alignas(void *) D3D12_PIPELINE_STATE_SUBOBJECT_TYPE CONCAT(header, subobj) = \ CONCAT(D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_, subobj); struct GraphicsStreamData