Skip to content

Commit 1a3c179

Browse files
authored
Avoid extra dependencies in the DxilRuntimeReflection header. NFC (microsoft#5645)
including `WinIncludes.h` here pulls in a bunch of dependencies like ATL even though we really don't need those in this header. Given that the only things we're using that include for is to use LPCWSTR and LPCVOID spellings in a way that works on both windows and unix, just expand those macros to their definitions instead.
1 parent babb237 commit 1a3c179

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

include/dxc/DxilContainer/DxilRuntimeReflection.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#pragma once
1313

1414
#include "dxc/DXIL/DxilConstants.h"
15-
#include "dxc/Support/WinIncludes.h"
1615

1716
#define RDAT_NULL_REF ((uint32_t)0xFFFFFFFF)
1817

@@ -634,19 +633,19 @@ struct DxilResourceDesc {
634633
uint32_t Space;
635634
uint32_t UpperBound;
636635
uint32_t LowerBound;
637-
LPCWSTR Name;
636+
const wchar_t *Name;
638637
uint32_t Flags; // hlsl::RDAT::DxilResourceFlag
639638
};
640639

641640
typedef const DxilResourceDesc *const *DxilResourceDescPtrArray;
642641

643642
struct DxilFunctionDesc {
644-
LPCWSTR Name;
645-
LPCWSTR UnmangledName;
643+
const wchar_t *Name;
644+
const wchar_t *UnmangledName;
646645
uint32_t NumResources;
647646
uint32_t NumFunctionDependencies;
648647
DxilResourceDescPtrArray Resources;
649-
const LPCWSTR *FunctionDependencies;
648+
const wchar_t *const *FunctionDependencies;
650649
DXIL::ShaderKind ShaderKind;
651650
uint32_t PayloadSizeInBytes; // 1) hit, miss, or closest shader: payload count
652651
// 2) call shader: parameter size
@@ -658,20 +657,20 @@ struct DxilFunctionDesc {
658657
};
659658

660659
struct DxilSubobjectDesc {
661-
LPCWSTR Name;
660+
const wchar_t *Name;
662661
DXIL::SubobjectKind Kind; // D3D12_STATE_SUBOBJECT_TYPE
663662

664663
struct StateObjectConfig_t {
665664
uint32_t Flags; // DXIL::StateObjectFlags / D3D12_STATE_OBJECT_FLAGS
666665
};
667666
struct RootSignature_t {
668-
LPCVOID pSerializedSignature;
667+
const void *pSerializedSignature;
669668
uint32_t SizeInBytes;
670669
}; // GlobalRootSignature or LocalRootSignature
671670
struct SubobjectToExportsAssociation_t {
672-
LPCWSTR Subobject;
671+
const wchar_t *Subobject;
673672
uint32_t NumExports;
674-
const LPCWSTR* Exports;
673+
const wchar_t *const *Exports;
675674
};
676675
struct RaytracingShaderConfig_t {
677676
uint32_t MaxPayloadSizeInBytes;
@@ -682,9 +681,9 @@ struct DxilSubobjectDesc {
682681
};
683682
struct HitGroup_t {
684683
DXIL::HitGroupType Type; // D3D12_HIT_GROUP_TYPE
685-
LPCWSTR AnyHit;
686-
LPCWSTR ClosestHit;
687-
LPCWSTR Intersection;
684+
const wchar_t *AnyHit;
685+
const wchar_t *ClosestHit;
686+
const wchar_t *Intersection;
688687
};
689688

690689
struct RaytracingPipelineConfig1_t {

0 commit comments

Comments
 (0)