Skip to content

Commit 62f3976

Browse files
committed
hlsl_generator: skip OpenCL+INTEL specific instructions
Signed-off-by: Ali Cheraghi <[email protected]>
1 parent d27eff5 commit 62f3976

File tree

2 files changed

+3
-88
lines changed

2 files changed

+3
-88
lines changed

tools/hlsl_generator/gen.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def gen(grammer_path, output_path):
124124
writer.write("\n//! Execution Modes\nnamespace execution_mode\n{")
125125
for em in execution_modes:
126126
name = em["enumerant"]
127+
if name.endswith("INTEL"): continue
127128
name_l = name[0].lower() + name[1:]
128129
writer.write("\n\tvoid " + name_l + "()\n\t{\n\t\tvk::ext_execution_mode(spv::ExecutionMode" + name + ");\n\t}\n")
129130
writer.write("}\n")
@@ -137,6 +138,8 @@ def gen(grammer_path, output_path):
137138

138139
writer.write("\n//! Instructions\n")
139140
for instruction in grammer["instructions"]:
141+
if instruction["opname"].endswith("INTEL"): continue
142+
140143
match instruction["class"]:
141144
case "Atomic":
142145
processInst(writer, instruction, InstOptions())

tools/hlsl_generator/out.hlsl

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -482,56 +482,6 @@ namespace execution_mode
482482
vk::ext_execution_mode(spv::ExecutionModeShadingRateInterlockUnorderedEXT);
483483
}
484484

485-
void sharedLocalMemorySizeINTEL()
486-
{
487-
vk::ext_execution_mode(spv::ExecutionModeSharedLocalMemorySizeINTEL);
488-
}
489-
490-
void roundingModeRTPINTEL()
491-
{
492-
vk::ext_execution_mode(spv::ExecutionModeRoundingModeRTPINTEL);
493-
}
494-
495-
void roundingModeRTNINTEL()
496-
{
497-
vk::ext_execution_mode(spv::ExecutionModeRoundingModeRTNINTEL);
498-
}
499-
500-
void floatingPointModeALTINTEL()
501-
{
502-
vk::ext_execution_mode(spv::ExecutionModeFloatingPointModeALTINTEL);
503-
}
504-
505-
void floatingPointModeIEEEINTEL()
506-
{
507-
vk::ext_execution_mode(spv::ExecutionModeFloatingPointModeIEEEINTEL);
508-
}
509-
510-
void maxWorkgroupSizeINTEL()
511-
{
512-
vk::ext_execution_mode(spv::ExecutionModeMaxWorkgroupSizeINTEL);
513-
}
514-
515-
void maxWorkDimINTEL()
516-
{
517-
vk::ext_execution_mode(spv::ExecutionModeMaxWorkDimINTEL);
518-
}
519-
520-
void noGlobalOffsetINTEL()
521-
{
522-
vk::ext_execution_mode(spv::ExecutionModeNoGlobalOffsetINTEL);
523-
}
524-
525-
void numSIMDWorkitemsINTEL()
526-
{
527-
vk::ext_execution_mode(spv::ExecutionModeNumSIMDWorkitemsINTEL);
528-
}
529-
530-
void schedulerTargetFmaxMhzINTEL()
531-
{
532-
vk::ext_execution_mode(spv::ExecutionModeSchedulerTargetFmaxMhzINTEL);
533-
}
534-
535485
void maximallyReconvergesKHR()
536486
{
537487
vk::ext_execution_mode(spv::ExecutionModeMaximallyReconvergesKHR);
@@ -541,36 +491,6 @@ namespace execution_mode
541491
{
542492
vk::ext_execution_mode(spv::ExecutionModeFPFastMathDefault);
543493
}
544-
545-
void streamingInterfaceINTEL()
546-
{
547-
vk::ext_execution_mode(spv::ExecutionModeStreamingInterfaceINTEL);
548-
}
549-
550-
void registerMapInterfaceINTEL()
551-
{
552-
vk::ext_execution_mode(spv::ExecutionModeRegisterMapInterfaceINTEL);
553-
}
554-
555-
void namedBarrierCountINTEL()
556-
{
557-
vk::ext_execution_mode(spv::ExecutionModeNamedBarrierCountINTEL);
558-
}
559-
560-
void maximumRegistersINTEL()
561-
{
562-
vk::ext_execution_mode(spv::ExecutionModeMaximumRegistersINTEL);
563-
}
564-
565-
void maximumRegistersIdINTEL()
566-
{
567-
vk::ext_execution_mode(spv::ExecutionModeMaximumRegistersIdINTEL);
568-
}
569-
570-
void namedMaximumRegistersINTEL()
571-
{
572-
vk::ext_execution_mode(spv::ExecutionModeNamedMaximumRegistersINTEL);
573-
}
574494
}
575495

576496
//! Group Operations
@@ -1622,14 +1542,6 @@ template<typename P>
16221542
[[vk::ext_instruction(spv::OpAtomicFAddEXT)]]
16231543
enable_if_t<is_spirv_type_v<P>, float64_t> atomicAddEXT_Float64(P pointer, uint32_t memoryScope, uint32_t semantics, float64_t value);
16241544

1625-
[[vk::ext_capability(spv::CapabilitySplitBarrierINTEL)]]
1626-
[[vk::ext_instruction(spv::OpControlBarrierArriveINTEL)]]
1627-
void controlBarrierArriveINTEL(uint32_t executionScope, uint32_t memoryScope, uint32_t semantics);
1628-
1629-
[[vk::ext_capability(spv::CapabilitySplitBarrierINTEL)]]
1630-
[[vk::ext_instruction(spv::OpControlBarrierWaitINTEL)]]
1631-
void controlBarrierWaitINTEL(uint32_t executionScope, uint32_t memoryScope, uint32_t semantics);
1632-
16331545
}
16341546

16351547
#endif

0 commit comments

Comments
 (0)