GL_EXT_ray_tracing_position_fetch
This commit is contained in:
parent
d6e9d3bb4e
commit
9d8c7b75c9
18 changed files with 461 additions and 194 deletions
164
SPIRV/spirv.hpp
164
SPIRV/spirv.hpp
|
|
@ -1,19 +1,19 @@
|
|||
// Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and/or associated documentation files (the "Materials"),
|
||||
// to deal in the Materials without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Materials, and to permit persons to whom the
|
||||
// Materials are furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Materials.
|
||||
//
|
||||
//
|
||||
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
//
|
||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
//
|
||||
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
// the Binary Section of the SPIR-V specification.
|
||||
|
||||
// Enumeration tokens for SPIR-V, in various styles:
|
||||
// C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
//
|
||||
// C, C++, C++11, JSON, Lua, Python, C#, D, Beef
|
||||
//
|
||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
|
|
@ -36,7 +36,9 @@
|
|||
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
//
|
||||
// - Beef will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
//
|
||||
// Some tokens act like mask values, which can be OR'd together,
|
||||
// while others are mutually exclusive. The mask-like ones have
|
||||
// "Mask" in their name, and a parallel enum that has the shift
|
||||
|
|
@ -66,6 +68,7 @@ enum SourceLanguage {
|
|||
SourceLanguageOpenCL_CPP = 4,
|
||||
SourceLanguageHLSL = 5,
|
||||
SourceLanguageCPP_for_OpenCL = 6,
|
||||
SourceLanguageSYCL = 7,
|
||||
SourceLanguageMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -192,6 +195,8 @@ enum ExecutionMode {
|
|||
ExecutionModeNoGlobalOffsetINTEL = 5895,
|
||||
ExecutionModeNumSIMDWorkitemsINTEL = 5896,
|
||||
ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
|
||||
ExecutionModeStreamingInterfaceINTEL = 6154,
|
||||
ExecutionModeNamedBarrierCountINTEL = 6417,
|
||||
ExecutionModeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -449,6 +454,7 @@ enum FunctionParameterAttribute {
|
|||
FunctionParameterAttributeNoCapture = 5,
|
||||
FunctionParameterAttributeNoWrite = 6,
|
||||
FunctionParameterAttributeNoReadWrite = 7,
|
||||
FunctionParameterAttributeRuntimeAlignedINTEL = 5940,
|
||||
FunctionParameterAttributeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -558,12 +564,27 @@ enum Decoration {
|
|||
DecorationPrefetchINTEL = 5902,
|
||||
DecorationStallEnableINTEL = 5905,
|
||||
DecorationFuseLoopsInFunctionINTEL = 5907,
|
||||
DecorationMathOpDSPModeINTEL = 5909,
|
||||
DecorationAliasScopeINTEL = 5914,
|
||||
DecorationNoAliasINTEL = 5915,
|
||||
DecorationInitiationIntervalINTEL = 5917,
|
||||
DecorationMaxConcurrencyINTEL = 5918,
|
||||
DecorationPipelineEnableINTEL = 5919,
|
||||
DecorationBufferLocationINTEL = 5921,
|
||||
DecorationIOPipeStorageINTEL = 5944,
|
||||
DecorationFunctionFloatingPointModeINTEL = 6080,
|
||||
DecorationSingleElementVectorINTEL = 6085,
|
||||
DecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||
DecorationMediaBlockIOINTEL = 6140,
|
||||
DecorationConduitKernelArgumentINTEL = 6175,
|
||||
DecorationRegisterMapKernelArgumentINTEL = 6176,
|
||||
DecorationMMHostInterfaceAddressWidthINTEL = 6177,
|
||||
DecorationMMHostInterfaceDataWidthINTEL = 6178,
|
||||
DecorationMMHostInterfaceLatencyINTEL = 6179,
|
||||
DecorationMMHostInterfaceReadWriteModeINTEL = 6180,
|
||||
DecorationMMHostInterfaceMaxBurstINTEL = 6181,
|
||||
DecorationMMHostInterfaceWaitRequestINTEL = 6182,
|
||||
DecorationStableKernelArgumentINTEL = 6183,
|
||||
DecorationMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -609,8 +630,8 @@ enum BuiltIn {
|
|||
BuiltInSubgroupLocalInvocationId = 41,
|
||||
BuiltInVertexIndex = 42,
|
||||
BuiltInInstanceIndex = 43,
|
||||
BuiltInCoreCountARM = 4161,
|
||||
BuiltInCoreIDARM = 4160,
|
||||
BuiltInCoreCountARM = 4161,
|
||||
BuiltInCoreMaxIDARM = 4162,
|
||||
BuiltInWarpIDARM = 4163,
|
||||
BuiltInWarpMaxIDARM = 4164,
|
||||
|
|
@ -691,6 +712,7 @@ enum BuiltIn {
|
|||
BuiltInHitKindKHR = 5333,
|
||||
BuiltInHitKindNV = 5333,
|
||||
BuiltInCurrentRayTimeNV = 5334,
|
||||
BuiltInHitTriangleVertexPositionsKHR = 5335,
|
||||
BuiltInIncomingRayFlagsKHR = 5351,
|
||||
BuiltInIncomingRayFlagsNV = 5351,
|
||||
BuiltInRayGeometryIndexKHR = 5352,
|
||||
|
|
@ -732,6 +754,8 @@ enum LoopControlShift {
|
|||
LoopControlMaxInterleavingINTELShift = 21,
|
||||
LoopControlSpeculatedIterationsINTELShift = 22,
|
||||
LoopControlNoFusionINTELShift = 23,
|
||||
LoopControlLoopCountINTELShift = 24,
|
||||
LoopControlMaxReinvocationDelayINTELShift = 25,
|
||||
LoopControlMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -754,6 +778,8 @@ enum LoopControlMask {
|
|||
LoopControlMaxInterleavingINTELMask = 0x00200000,
|
||||
LoopControlSpeculatedIterationsINTELMask = 0x00400000,
|
||||
LoopControlNoFusionINTELMask = 0x00800000,
|
||||
LoopControlLoopCountINTELMask = 0x01000000,
|
||||
LoopControlMaxReinvocationDelayINTELMask = 0x02000000,
|
||||
};
|
||||
|
||||
enum FunctionControlShift {
|
||||
|
|
@ -826,6 +852,8 @@ enum MemoryAccessShift {
|
|||
MemoryAccessMakePointerVisibleKHRShift = 4,
|
||||
MemoryAccessNonPrivatePointerShift = 5,
|
||||
MemoryAccessNonPrivatePointerKHRShift = 5,
|
||||
MemoryAccessAliasScopeINTELMaskShift = 16,
|
||||
MemoryAccessNoAliasINTELMaskShift = 17,
|
||||
MemoryAccessMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -840,6 +868,8 @@ enum MemoryAccessMask {
|
|||
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
|
||||
MemoryAccessNonPrivatePointerMask = 0x00000020,
|
||||
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
|
||||
MemoryAccessAliasScopeINTELMaskMask = 0x00010000,
|
||||
MemoryAccessNoAliasINTELMaskMask = 0x00020000,
|
||||
};
|
||||
|
||||
enum Scope {
|
||||
|
|
@ -1003,7 +1033,7 @@ enum Capability {
|
|||
CapabilityMeshShadingNV = 5266,
|
||||
CapabilityImageFootprintNV = 5282,
|
||||
CapabilityMeshShadingEXT = 5283,
|
||||
CapabilityFragmentBarycentricKHR = 5284,
|
||||
CapabilityFragmentBarycentricKHR = 5284,
|
||||
CapabilityFragmentBarycentricNV = 5284,
|
||||
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||
CapabilityFragmentDensityEXT = 5291,
|
||||
|
|
@ -1033,6 +1063,7 @@ enum Capability {
|
|||
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
||||
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
|
||||
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||
CapabilityRayTracingPositionFetchKHR = 5336,
|
||||
CapabilityRayTracingNV = 5340,
|
||||
CapabilityRayTracingMotionBlurNV = 5341,
|
||||
CapabilityVulkanMemoryModel = 5345,
|
||||
|
|
@ -1050,8 +1081,10 @@ enum Capability {
|
|||
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||
CapabilityDemoteToHelperInvocation = 5379,
|
||||
CapabilityDemoteToHelperInvocationEXT = 5379,
|
||||
CapabilityRayTracingOpacityMicromapEXT = 5381,
|
||||
CapabilityShaderInvocationReorderNV = 5383,
|
||||
CapabilityBindlessTextureNV = 5390,
|
||||
CapabilityRayQueryPositionFetchKHR = 5391,
|
||||
CapabilitySubgroupShuffleINTEL = 5568,
|
||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||
|
|
@ -1084,9 +1117,13 @@ enum Capability {
|
|||
CapabilityFPGAMemoryAccessesINTEL = 5898,
|
||||
CapabilityFPGAClusterAttributesINTEL = 5904,
|
||||
CapabilityLoopFuseINTEL = 5906,
|
||||
CapabilityFPGADSPControlINTEL = 5908,
|
||||
CapabilityMemoryAccessAliasingINTEL = 5910,
|
||||
CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
|
||||
CapabilityFPGABufferLocationINTEL = 5920,
|
||||
CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||
CapabilityUSMStorageClassesINTEL = 5935,
|
||||
CapabilityRuntimeAlignedAttributeINTEL = 5939,
|
||||
CapabilityIOPipesINTEL = 5943,
|
||||
CapabilityBlockingPipesINTEL = 5945,
|
||||
CapabilityFPGARegINTEL = 5948,
|
||||
|
|
@ -1100,12 +1137,16 @@ enum Capability {
|
|||
CapabilityDotProductKHR = 6019,
|
||||
CapabilityRayCullMaskKHR = 6020,
|
||||
CapabilityBitInstructions = 6025,
|
||||
CapabilityGroupNonUniformRotateKHR = 6026,
|
||||
CapabilityAtomicFloat32AddEXT = 6033,
|
||||
CapabilityAtomicFloat64AddEXT = 6034,
|
||||
CapabilityLongConstantCompositeINTEL = 6089,
|
||||
CapabilityOptNoneINTEL = 6094,
|
||||
CapabilityAtomicFloat16AddEXT = 6095,
|
||||
CapabilityDebugInfoModuleINTEL = 6114,
|
||||
CapabilitySplitBarrierINTEL = 6141,
|
||||
CapabilityFPGAArgumentInterfacesINTEL = 6174,
|
||||
CapabilityGroupUniformArithmeticKHR = 6400,
|
||||
CapabilityMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -1120,6 +1161,7 @@ enum RayFlagsShift {
|
|||
RayFlagsCullNoOpaqueKHRShift = 7,
|
||||
RayFlagsSkipTrianglesKHRShift = 8,
|
||||
RayFlagsSkipAABBsKHRShift = 9,
|
||||
RayFlagsForceOpacityMicromap2StateEXTShift = 10,
|
||||
RayFlagsMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
|
@ -1135,6 +1177,7 @@ enum RayFlagsMask {
|
|||
RayFlagsCullNoOpaqueKHRMask = 0x00000080,
|
||||
RayFlagsSkipTrianglesKHRMask = 0x00000100,
|
||||
RayFlagsSkipAABBsKHRMask = 0x00000200,
|
||||
RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
|
||||
};
|
||||
|
||||
enum RayQueryIntersection {
|
||||
|
|
@ -1561,6 +1604,7 @@ enum Op {
|
|||
OpSubgroupAllKHR = 4428,
|
||||
OpSubgroupAnyKHR = 4429,
|
||||
OpSubgroupAllEqualKHR = 4430,
|
||||
OpGroupNonUniformRotateKHR = 4431,
|
||||
OpSubgroupReadInvocationKHR = 4432,
|
||||
OpTraceRayKHR = 4445,
|
||||
OpExecuteCallableKHR = 4446,
|
||||
|
|
@ -1642,6 +1686,7 @@ enum Op {
|
|||
OpTraceNV = 5337,
|
||||
OpTraceMotionNV = 5338,
|
||||
OpTraceRayMotionNV = 5339,
|
||||
OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
|
||||
OpTypeAccelerationStructureKHR = 5341,
|
||||
OpTypeAccelerationStructureNV = 5341,
|
||||
OpExecuteCallableNV = 5344,
|
||||
|
|
@ -1862,6 +1907,9 @@ enum Op {
|
|||
OpArbitraryFloatPowRINTEL = 5881,
|
||||
OpArbitraryFloatPowNINTEL = 5882,
|
||||
OpLoopControlINTEL = 5887,
|
||||
OpAliasDomainDeclINTEL = 5911,
|
||||
OpAliasScopeDeclINTEL = 5912,
|
||||
OpAliasScopeListDeclINTEL = 5913,
|
||||
OpFixedSqrtINTEL = 5923,
|
||||
OpFixedRecipINTEL = 5924,
|
||||
OpFixedRsqrtINTEL = 5925,
|
||||
|
|
@ -1900,10 +1948,23 @@ enum Op {
|
|||
OpTypeStructContinuedINTEL = 6090,
|
||||
OpConstantCompositeContinuedINTEL = 6091,
|
||||
OpSpecConstantCompositeContinuedINTEL = 6092,
|
||||
OpControlBarrierArriveINTEL = 6142,
|
||||
OpControlBarrierWaitINTEL = 6143,
|
||||
OpGroupIMulKHR = 6401,
|
||||
OpGroupFMulKHR = 6402,
|
||||
OpGroupBitwiseAndKHR = 6403,
|
||||
OpGroupBitwiseOrKHR = 6404,
|
||||
OpGroupBitwiseXorKHR = 6405,
|
||||
OpGroupLogicalAndKHR = 6406,
|
||||
OpGroupLogicalOrKHR = 6407,
|
||||
OpGroupLogicalXorKHR = 6408,
|
||||
OpMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
#ifdef SPV_ENABLE_UTILITY_CODE
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
*hasResult = *hasResultType = false;
|
||||
switch (opcode) {
|
||||
|
|
@ -2258,6 +2319,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
|
||||
|
|
@ -2288,10 +2350,43 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break;
|
||||
case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
|
||||
|
|
@ -2299,6 +2394,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
|
||||
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
||||
|
|
@ -2515,6 +2611,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
|
|
@ -2553,23 +2652,64 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
|
||||
}
|
||||
}
|
||||
#endif /* SPV_ENABLE_UTILITY_CODE */
|
||||
|
||||
// Overload operator| for mask bit combining
|
||||
// Overload bitwise operators for mask bit combining
|
||||
|
||||
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
|
||||
inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
|
||||
inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
|
||||
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
|
||||
inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
|
||||
inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
|
||||
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
|
||||
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
|
||||
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
|
||||
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
|
||||
inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
|
||||
inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
|
||||
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
|
||||
inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
|
||||
inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
|
||||
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
|
||||
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
|
||||
inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
|
||||
inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
|
||||
inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
|
||||
|
||||
} // end namespace spv
|
||||
|
||||
#endif // #ifndef spirv_HPP
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue