@@ -453,6 +453,20 @@ struct CompileTimeConst {
453453 } values; // /< The compile-time values for this slot.
454454};
455455
456+ #if LLPC_BUILD_GFX12
457+ // / Handle temporal hint
458+ enum TemporalHintOpType {
459+ TemporalHintAtmWrite = 0 ,
460+ TemporalHintImageRead = 4 ,
461+ TemporalHintImageWrite = 8 ,
462+ TemporalHintTessFactorWrite = 12 ,
463+ TemporalHintTessRead = 16 ,
464+ TemporalHintTessWrite = 20 ,
465+ TemporalHintBufferRead = 24 ,
466+ TemporalHintBufferWrite = 28 ,
467+ };
468+ #endif
469+
456470// / Represents info of compile-time constants within a shader of a specified stage.
457471struct CompileConstInfo {
458472 unsigned numCompileTimeConstants; // /< Number of compile time constants.
@@ -496,7 +510,11 @@ struct PipelineOptions {
496510 bool reverseThreadGroup; // /< If set, enable thread group reversing
497511 bool internalRtShaders; // /< Whether this pipeline has internal raytracing shaders
498512 unsigned forceNonUniformResourceIndexStageMask; // /< Mask of the stage to force using non-uniform resource index.
513+ #if LLPC_BUILD_GFX12
514+ bool expertSchedulingMode;
515+ #else
499516 bool reserved16;
517+ #endif
500518
501519 struct GLState {
502520 bool replaceSetWithResourceType; // /< For OGL only, replace 'set' with resource type during spirv translate
@@ -519,14 +537,27 @@ struct PipelineOptions {
519537 } glState;
520538 const auto &getGlState () const { return glState; }
521539
540+ #if LLPC_BUILD_GFX12
541+ unsigned cacheScopePolicyControl; // /< Control cache scope policy. attributes-through-memory read/write is
542+ // / available.
543+ #else
522544 unsigned reserved20;
545+ #endif
523546 bool enablePrimGeneratedQuery; // /< If set, primitive generated query is enabled
524547 bool disablePerCompFetch; // /< Disable per component fetch in uber fetch shader.
525548 bool reserved21;
526549 bool optimizePointSizeWrite; // /< If set, the write of PointSize in the last vertex processing stage will be
527550 // /< eliminated if the write value is 1.0.
528551 CompileConstInfo *compileConstInfo; // /< Compile time constant data.
552+ #if LLPC_BUILD_GFX12
553+ unsigned temporalHintControl; // /< Override value for temporal hint. A load/store occupies 4 bits. The highest bit
554+ // / of 4 bits marks whether to override temporal hint.
555+ // / Arrange from the low bit to high bit in the following order:
556+ // / TemporalHintAtmWrite,TemporalHintImageRead, TemporalHintImageWrite,
557+ // / TemporalHintTessFactorWrite, TemporalHintTessRead, TemporalHintTessWrite
558+ #else
529559 unsigned reserved22;
560+ #endif
530561 bool padBufferSizeToNextDword; // /< Vulkan only, set if the driver rounds the buffer size up the next dword
531562};
532563
@@ -776,6 +807,28 @@ inline unsigned compact32(ShaderHash hash) {
776807// / Represent a pipeline option which can be automatic as well as explicitly set.
777808enum InvariantLoads : unsigned { Auto = 0 , EnableOptimization = 1 , DisableOptimization = 2 , ClearInvariants = 3 };
778809
810+ #if LLPC_BUILD_GFX12
811+ // / Control cache policy: whether to use LLC (last level cache, aka set noAlloc).
812+ struct CachePolicyLlc {
813+ union NoAllocResource {
814+ struct {
815+ unsigned set : 5 ; // /< Resource set
816+ unsigned binding : 16 ; // /< Resource binding
817+ unsigned noAlloc : 1 ; // /< llc_noAlloc policy
818+ unsigned : 10 ;
819+ };
820+ struct {
821+ unsigned resourceId : 21 ; // /< Resource set
822+ unsigned : 11 ;
823+ };
824+ unsigned u32All;
825+ };
826+
827+ const unsigned *noAllocs; // Set for each resource.
828+ unsigned resourceCount; // The count of resources
829+ };
830+ #endif
831+
779832// / Represents per shader stage options.
780833struct PipelineShaderOptions {
781834 ShaderHash clientHash; // /< Client-supplied unique shader hash. A value of zero indicates that LLPC should
@@ -918,6 +971,10 @@ struct PipelineShaderOptions {
918971 // / Application workaround: forward propagate NoContraction decoration to any related FAdd operation.
919972 bool forwardPropagateNoContract;
920973
974+ #if LLPC_BUILD_GFX12
975+ // / Enable round-robin mode for waves in workgroup.
976+ bool workgroupRoundRobin;
977+ #endif
921978 // / Binding ID offset of default uniform block
922979 unsigned constantBufferBindingOffset;
923980
@@ -931,6 +988,15 @@ struct PipelineShaderOptions {
931988 // / will be assigned values as if they were decorated as DeviceIndex.
932989 bool viewIndexFromDeviceIndex;
933990
991+ #if LLPC_BUILD_GFX12
992+ // / Control LLC cache policy
993+ CachePolicyLlc cachePolicyLlc;
994+
995+ // / Override value for temporal hint. A load/store occupies 4 bits. The highest bit of 4 bits marks whether to
996+ // / override temporal hint.
997+ unsigned temporalHintShaderControl;
998+ #endif
999+
9341000 // / Indicate whether the vertex shader is used by transform pipeline
9351001 bool enableTransformShader;
9361002
@@ -1471,13 +1537,18 @@ struct RayTracingPipelineBuildInfo {
14711537 unsigned pipelineLibStageMask; // /< Pipeline library stage mask
14721538 // @}
14731539
1474- unsigned payloadSizeMaxInLib; // /< Pipeline library maxPayloadSize
1475- unsigned attributeSizeMaxInLib; // /< Pipeline library maxAttributeSize
1476- bool isReplay; // /< Pipeline is created for replaying
1477- const void *pClientMetadata; // /< Pointer to (optional) client-defined data to be
1478- // / stored inside the ELF
1479- size_t clientMetadataSize; // /< Size (in bytes) of the client-defined data
1480- unsigned cpsFlags; // /< Cps feature flags
1540+ unsigned payloadSizeMaxInLib; // /< Pipeline library maxPayloadSize
1541+ unsigned attributeSizeMaxInLib; // /< Pipeline library maxAttributeSize
1542+ bool isReplay; // /< Pipeline is created for replaying
1543+ const void *pClientMetadata; // /< Pointer to (optional) client-defined data to be
1544+ // / stored inside the ELF
1545+ size_t clientMetadataSize; // /< Size (in bytes) of the client-defined data
1546+ unsigned cpsFlags; // /< Cps feature flags
1547+ #if LLPC_BUILD_GFX12
1548+ bool disableDynamicVgpr; // /< Whether to disable dynamic VGPR mode for continuations. If not set, dVGPR mode is
1549+ // / enabled by default.
1550+ unsigned dynamicVgprBlockSize; // /< The size of the VGPR allocation granule used in dVGPR mode.
1551+ #endif
14811552 GpurtOption *pGpurtOptions; // /< Array of GPURT options
14821553 unsigned gpurtOptionCount; // /< Number of GPURT options
14831554 bool rtIgnoreDeclaredPayloadSize; // /< Ignore the declared payload size in the shader to address issues with Proton.
0 commit comments