|
@@ -2526,6 +2526,7 @@ protected:
|
|
typedef SmallSetVector<UINT32, 8> ResourceUseSet;
|
|
typedef SmallSetVector<UINT32, 8> ResourceUseSet;
|
|
ResourceUseSet m_UsedResources;
|
|
ResourceUseSet m_UsedResources;
|
|
ResourceUseSet m_UsedCBs;
|
|
ResourceUseSet m_UsedCBs;
|
|
|
|
+ UINT64 m_FeatureFlags;
|
|
|
|
|
|
public:
|
|
public:
|
|
void Initialize(DxilLibraryReflection* pLibraryReflection, Function *pFunction) {
|
|
void Initialize(DxilLibraryReflection* pLibraryReflection, Function *pFunction) {
|
|
@@ -2547,6 +2548,9 @@ public:
|
|
void AddCBReference(UINT cbIndex) {
|
|
void AddCBReference(UINT cbIndex) {
|
|
m_UsedCBs.insert(cbIndex);
|
|
m_UsedCBs.insert(cbIndex);
|
|
}
|
|
}
|
|
|
|
+ void SetFeatureFlags(UINT64 flags) {
|
|
|
|
+ m_FeatureFlags = flags;
|
|
|
|
+ }
|
|
|
|
|
|
// ID3D12FunctionReflection
|
|
// ID3D12FunctionReflection
|
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc);
|
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc);
|
|
@@ -2609,7 +2613,12 @@ HRESULT CFunctionReflection::GetDesc(D3D12_FUNCTION_DESC *pDesc) {
|
|
//Unset: UINT ConversionInstructionCount; // Number of type conversion instructions used
|
|
//Unset: UINT ConversionInstructionCount; // Number of type conversion instructions used
|
|
//Unset: UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used
|
|
//Unset: UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used
|
|
//Unset: D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code
|
|
//Unset: D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code
|
|
- //Unset: UINT64 RequiredFeatureFlags; // Required feature flags
|
|
|
|
|
|
+
|
|
|
|
+ pDesc->RequiredFeatureFlags = m_FeatureFlags & ~(UINT64)D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL;
|
|
|
|
+ if (kind == DXIL::ShaderKind::Pixel && m_pProps &&
|
|
|
|
+ m_pProps->ShaderProps.PS.EarlyDepthStencil) {
|
|
|
|
+ pDesc->RequiredFeatureFlags |= D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL;
|
|
|
|
+ }
|
|
|
|
|
|
pDesc->Name = m_Name.c_str();
|
|
pDesc->Name = m_Name.c_str();
|
|
|
|
|
|
@@ -2697,6 +2706,8 @@ void DxilLibraryReflection::AddResourceDependencies() {
|
|
m_FunctionsByPtr[F] = func.get();
|
|
m_FunctionsByPtr[F] = func.get();
|
|
orderedMap[FR.getName()] = func.get();
|
|
orderedMap[FR.getName()] = func.get();
|
|
|
|
|
|
|
|
+ func->SetFeatureFlags(FR.GetFeatureFlags());
|
|
|
|
+
|
|
for (unsigned iRes = 0; iRes < FR.getResources().Count(); ++iRes) {
|
|
for (unsigned iRes = 0; iRes < FR.getResources().Count(); ++iRes) {
|
|
auto RR = FR.getResources()[iRes];
|
|
auto RR = FR.getResources()[iRes];
|
|
unsigned id = RR.getID();
|
|
unsigned id = RR.getID();
|