@@ -260,6 +260,13 @@ struct PSVComponentMask {
260
260
}
261
261
return *this ;
262
262
}
263
+ bool operator !=(const PSVComponentMask &other) const {
264
+ if (NumVectors != other.NumVectors )
265
+ return true ;
266
+ return memcmp (Mask, other.Mask ,
267
+ PSVComputeMaskDwordsFromVectors (NumVectors) *
268
+ sizeof (uint32_t ));
269
+ }
263
270
bool Get (uint32_t ComponentIndex) const {
264
271
if (ComponentIndex < NumVectors * 4 )
265
272
return (bool )(Mask[ComponentIndex >> 5 ] & (1 << (ComponentIndex & 0x1F )));
@@ -295,6 +302,15 @@ struct PSVDependencyTable {
295
302
const PSVComponentMask GetMaskForInput (uint32_t inputComponentIndex) const {
296
303
return getMaskForInput (inputComponentIndex);
297
304
}
305
+ bool operator !=(const PSVDependencyTable &other) const {
306
+ if (InputVectors != other.InputVectors ||
307
+ OutputVectors != other.OutputVectors )
308
+ return true ;
309
+ return memcmp (
310
+ Table, other.Table ,
311
+ PSVComputeInputOutputTableDwords (InputVectors, OutputVectors) *
312
+ sizeof (uint32_t ));
313
+ }
298
314
bool IsValid () const { return Table != nullptr ; }
299
315
void Print (llvm::raw_ostream &, const char *, const char *) const ;
300
316
@@ -449,6 +465,8 @@ class PSVSignatureElement {
449
465
return !m_pElement0 ? 0 : (uint32_t )m_pElement0->DynamicMaskAndStream & 0xF ;
450
466
}
451
467
void Print (llvm::raw_ostream &O) const ;
468
+ void Print (llvm::raw_ostream &O, const char *Name,
469
+ const uint32_t *SemanticIndexes) const ;
452
470
};
453
471
454
472
#define MAX_PSV_VERSION 3
@@ -595,6 +613,14 @@ class DxilPipelineStateValidation {
595
613
return ReadOrWrite (pBuffer, pSize, Mode, initInfo);
596
614
}
597
615
616
+ uint32_t GetRuntimeInfoSize () const { return m_uPSVRuntimeInfoSize; }
617
+ uint32_t GetResourceBindInfoSize () const {
618
+ return m_uPSVResourceBindInfoSize;
619
+ }
620
+ uint32_t GetSignatureElementSize () const {
621
+ return m_uPSVSignatureElementSize;
622
+ }
623
+
598
624
PSVRuntimeInfo0 *GetPSVRuntimeInfo0 () const { return m_pPSVRuntimeInfo0; }
599
625
600
626
PSVRuntimeInfo1 *GetPSVRuntimeInfo1 () const { return m_pPSVRuntimeInfo1; }
@@ -752,6 +778,7 @@ class DxilPipelineStateValidation {
752
778
}
753
779
void PrintPSVRuntimeInfo (llvm::raw_ostream &O, uint8_t ShaderKind,
754
780
const char *Comment) const ;
781
+ void PrintViewIDState (llvm::raw_ostream &OS) const ;
755
782
void Print (llvm::raw_ostream &O, uint8_t ShaderKind) const ;
756
783
};
757
784
@@ -1084,6 +1111,9 @@ class ViewIDValidator {
1084
1111
ViewIDValidator *NewViewIDValidator (unsigned viewIDCount,
1085
1112
unsigned gsRastStreamIndex);
1086
1113
1114
+ uint32_t GetPSVVersion (uint32_t ValidatorMajorVersion,
1115
+ uint32_t ValidatorMinorVersion);
1116
+
1087
1117
void InitPSVResourceBinding (PSVResourceBindInfo0 *, PSVResourceBindInfo1 *,
1088
1118
DxilResourceBase *);
1089
1119
@@ -1093,11 +1123,15 @@ void InitPSVSignatureElement(PSVSignatureElement0 &E,
1093
1123
const DxilSignatureElement &SE,
1094
1124
bool i1ToUnknownCompat);
1095
1125
1096
- // Setup PSVRuntimeInfo* with DxilModule.
1097
- // Note that the EntryFunctionName is not done.
1098
- void InitPSVRuntimeInfo (PSVRuntimeInfo0 *pInfo, PSVRuntimeInfo1 *pInfo1,
1099
- PSVRuntimeInfo2 *pInfo2, PSVRuntimeInfo3 *pInfo3,
1100
- const DxilModule &DM);
1126
+ // Setup shader properties for PSVRuntimeInfo* with DxilModule.
1127
+ void SetShaderProps (PSVRuntimeInfo0 *pInfo, const DxilModule &DM);
1128
+ void SetShaderProps (PSVRuntimeInfo1 *pInfo1, const DxilModule &DM);
1129
+ void SetShaderProps (PSVRuntimeInfo2 *pInfo2, const DxilModule &DM);
1130
+
1131
+ void PrintPSVRuntimeInfo (llvm::raw_ostream &OS, PSVRuntimeInfo0 *pInfo0,
1132
+ PSVRuntimeInfo1 *pInfo1, PSVRuntimeInfo2 *pInfo2,
1133
+ PSVRuntimeInfo3 *pInfo3, uint8_t ShaderKind,
1134
+ const char *EntryName, const char *Comment);
1101
1135
1102
1136
} // namespace hlsl
1103
1137
0 commit comments