Skip to content

Commit 981506e

Browse files
paigealeigcbot
authored andcommitted
Adding new enums and structs in CodeGenPublic
This change adds needed new enums and structs in CodeGenPublic
1 parent f39255f commit 981506e

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

IGC/Compiler/CodeGenPublic.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,13 +414,21 @@ namespace IGC
414414
int DerivedConstantsOffset = -1;
415415
};
416416

417-
418417
struct SResInfoFoldingOutput
419418
{
420419
uint32_t textureID;
421420
bool value[4];
422421
};
423422

423+
struct CustomResourceOutput
424+
{
425+
unsigned regIndex;
426+
unsigned regSpace;
427+
int rangeSize;
428+
DXResourceClass resType;
429+
DXResourceKind resShape;
430+
};
431+
424432
enum SIMDInfoBit
425433
{
426434
SIMD_SELECTED, // 0: if the SIMD is selected. If 1, all the other bits are ignored.
@@ -471,6 +479,7 @@ namespace IGC
471479

472480
bool hasEvalSampler = false;
473481
std::vector<SResInfoFoldingOutput> m_ResInfoFoldingOutput;
482+
474483
// GenUpdateCB outputs
475484
void* m_ConstantBufferReplaceShaderPatterns = nullptr;
476485
uint m_ConstantBufferReplaceShaderPatternsSize = 0;

IGC/Compiler/CodeGenPublicEnums.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,40 @@ namespace IGC
336336

337337
NUM_ARG_SPACE_RESERVATION_SLOTS
338338
};
339+
340+
//copied from DXILConstants.h
341+
enum class DXResourceClass {
342+
SRV = 0,
343+
UAV,
344+
CBuffer,
345+
Sampler,
346+
Invalid
347+
};
348+
349+
//copied from DXILConstants.h
350+
enum class DXResourceKind : unsigned {
351+
Invalid = 0,
352+
Texture1D,
353+
Texture2D,
354+
Texture2DMS,
355+
Texture3D,
356+
TextureCube,
357+
Texture1DArray,
358+
Texture2DArray,
359+
Texture2DMSArray,
360+
TextureCubeArray,
361+
TypedBuffer,
362+
RawBuffer,
363+
StructuredBuffer,
364+
CBuffer,
365+
Sampler,
366+
TBuffer,
367+
RTAccelerationStructure,
368+
FeedbackTexture2D,
369+
FeedbackTexture2DArray,
370+
NumEntries,
371+
};
372+
339373
}
340374

341375
#endif //CODE_GEN_PUBLIC_ENUMS_H_

0 commit comments

Comments
 (0)