Add support for GL_NV_shader_invocation_reorder. (#3054)

This commit is contained in:
alelenv 2022-12-09 12:19:08 -08:00 committed by GitHub
parent 19d816c8c9
commit 4fc43cd3c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 7478 additions and 5636 deletions

View file

@ -246,6 +246,7 @@ const char* StorageClassString(int StorageClass)
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
default: return "Bad";
}
}
@ -320,6 +321,8 @@ const char* DecorationString(int decoration)
case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT";
case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT";
case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV";
}
}
@ -1006,6 +1009,7 @@ const char* CapabilityString(int info)
case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM";
case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV";
default: return "Bad";
}
}
@ -1460,6 +1464,40 @@ const char* OpcodeString(int op)
case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
case OpTypeHitObjectNV: return "OpTypeHitObjectNV";
case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV";
case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV";
case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV";
case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV";
case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV";
case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV";
case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV";
case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV";
case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV";
case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV";
case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV";
case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV";
case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV";
case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV";
case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV";
case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV";
case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV";
case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV";
case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV";
case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV";
case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV";
case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV";
case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV";
case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV";
case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV";
case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV";
case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV";
case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV";
case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV";
case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV";
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
default:
return "Bad";
}
@ -3037,6 +3075,191 @@ void Parameterize()
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false);
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true);
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'");
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'");
InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false);
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'");
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'");
InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'");
InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
}
}; // end spv namespace