Add Vulkan 1.3 support
Also update known goods to Vulkan 1.3 support Also re-enable SPIR-V 1.6 tests with vulkan1.3 target Also re-cache SPIRV 1.6 header which somehow regressed back to 1.5
This commit is contained in:
parent
81cc10a498
commit
9ebd8ff6c1
@ -68,26 +68,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
|
||||
}
|
||||
case glslang::EShTargetVulkan_1_2:
|
||||
return spv_target_env::SPV_ENV_VULKAN_1_2;
|
||||
case glslang::EShTargetUniversal:
|
||||
switch (spvVersion.spv) {
|
||||
case EShTargetSpv_1_0:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
|
||||
case EShTargetSpv_1_1:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_1;
|
||||
case EShTargetSpv_1_2:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_2;
|
||||
case EShTargetSpv_1_3:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_3;
|
||||
case EShTargetSpv_1_4:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_4;
|
||||
case EShTargetSpv_1_5:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_5;
|
||||
case EShTargetSpv_1_6:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
|
||||
default:
|
||||
logger->missingFunctionality("Target version for SPIRV-Tools validator");
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
|
||||
}
|
||||
case glslang::EShTargetVulkan_1_3:
|
||||
return spv_target_env::SPV_ENV_VULKAN_1_3;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
209
SPIRV/spirv.hpp
209
SPIRV/spirv.hpp
@ -49,12 +49,12 @@ namespace spv {
|
||||
|
||||
typedef unsigned int Id;
|
||||
|
||||
#define SPV_VERSION 0x10500
|
||||
#define SPV_REVISION 4
|
||||
#define SPV_VERSION 0x10600
|
||||
#define SPV_REVISION 1
|
||||
|
||||
static const unsigned int MagicNumber = 0x07230203;
|
||||
static const unsigned int Version = 0x00010500;
|
||||
static const unsigned int Revision = 4;
|
||||
static const unsigned int Version = 0x00010600;
|
||||
static const unsigned int Revision = 1;
|
||||
static const unsigned int OpCodeMask = 0xffff;
|
||||
static const unsigned int WordCountShift = 16;
|
||||
|
||||
@ -65,6 +65,7 @@ enum SourceLanguage {
|
||||
SourceLanguageOpenCL_C = 3,
|
||||
SourceLanguageOpenCL_CPP = 4,
|
||||
SourceLanguageHLSL = 5,
|
||||
SourceLanguageCPP_for_OpenCL = 6,
|
||||
SourceLanguageMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -352,6 +353,8 @@ enum ImageOperandsShift {
|
||||
ImageOperandsVolatileTexelKHRShift = 11,
|
||||
ImageOperandsSignExtendShift = 12,
|
||||
ImageOperandsZeroExtendShift = 13,
|
||||
ImageOperandsNontemporalShift = 14,
|
||||
ImageOperandsOffsetsShift = 16,
|
||||
ImageOperandsMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -375,6 +378,8 @@ enum ImageOperandsMask {
|
||||
ImageOperandsVolatileTexelKHRMask = 0x00000800,
|
||||
ImageOperandsSignExtendMask = 0x00001000,
|
||||
ImageOperandsZeroExtendMask = 0x00002000,
|
||||
ImageOperandsNontemporalMask = 0x00004000,
|
||||
ImageOperandsOffsetsMask = 0x00010000,
|
||||
};
|
||||
|
||||
enum FPFastMathModeShift {
|
||||
@ -491,6 +496,7 @@ enum Decoration {
|
||||
DecorationPerPrimitiveNV = 5271,
|
||||
DecorationPerViewNV = 5272,
|
||||
DecorationPerTaskNV = 5273,
|
||||
DecorationPerVertexKHR = 5285,
|
||||
DecorationPerVertexNV = 5285,
|
||||
DecorationNonUniform = 5300,
|
||||
DecorationNonUniformEXT = 5300,
|
||||
@ -498,6 +504,10 @@ enum Decoration {
|
||||
DecorationRestrictPointerEXT = 5355,
|
||||
DecorationAliasedPointer = 5356,
|
||||
DecorationAliasedPointerEXT = 5356,
|
||||
DecorationBindlessSamplerNV = 5398,
|
||||
DecorationBindlessImageNV = 5399,
|
||||
DecorationBoundSamplerNV = 5400,
|
||||
DecorationBoundImageNV = 5401,
|
||||
DecorationSIMTCallINTEL = 5599,
|
||||
DecorationReferencedIndirectlyINTEL = 5602,
|
||||
DecorationClobberINTEL = 5607,
|
||||
@ -537,6 +547,7 @@ enum Decoration {
|
||||
DecorationFunctionFloatingPointModeINTEL = 6080,
|
||||
DecorationSingleElementVectorINTEL = 6085,
|
||||
DecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||
DecorationMediaBlockIOINTEL = 6140,
|
||||
DecorationMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -621,7 +632,9 @@ enum BuiltIn {
|
||||
BuiltInLayerPerViewNV = 5279,
|
||||
BuiltInMeshViewCountNV = 5280,
|
||||
BuiltInMeshViewIndicesNV = 5281,
|
||||
BuiltInBaryCoordKHR = 5286,
|
||||
BuiltInBaryCoordNV = 5286,
|
||||
BuiltInBaryCoordNoPerspKHR = 5287,
|
||||
BuiltInBaryCoordNoPerspNV = 5287,
|
||||
BuiltInFragSizeEXT = 5292,
|
||||
BuiltInFragmentSizeNV = 5292,
|
||||
@ -722,6 +735,7 @@ enum FunctionControlShift {
|
||||
FunctionControlDontInlineShift = 1,
|
||||
FunctionControlPureShift = 2,
|
||||
FunctionControlConstShift = 3,
|
||||
FunctionControlOptNoneINTELShift = 16,
|
||||
FunctionControlMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -731,6 +745,7 @@ enum FunctionControlMask {
|
||||
FunctionControlDontInlineMask = 0x00000002,
|
||||
FunctionControlPureMask = 0x00000004,
|
||||
FunctionControlConstMask = 0x00000008,
|
||||
FunctionControlOptNoneINTELMask = 0x00010000,
|
||||
};
|
||||
|
||||
enum MemorySemanticsShift {
|
||||
@ -911,6 +926,7 @@ enum Capability {
|
||||
CapabilityGroupNonUniformQuad = 68,
|
||||
CapabilityShaderLayer = 69,
|
||||
CapabilityShaderViewportIndex = 70,
|
||||
CapabilityUniformDecoration = 71,
|
||||
CapabilityFragmentShadingRateKHR = 4422,
|
||||
CapabilitySubgroupBallotKHR = 4423,
|
||||
CapabilityDrawParameters = 4427,
|
||||
@ -959,6 +975,7 @@ enum Capability {
|
||||
CapabilityFragmentFullyCoveredEXT = 5265,
|
||||
CapabilityMeshShadingNV = 5266,
|
||||
CapabilityImageFootprintNV = 5282,
|
||||
CapabilityFragmentBarycentricKHR = 5284,
|
||||
CapabilityFragmentBarycentricNV = 5284,
|
||||
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||
CapabilityFragmentDensityEXT = 5291,
|
||||
@ -1005,6 +1022,7 @@ enum Capability {
|
||||
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||
CapabilityDemoteToHelperInvocation = 5379,
|
||||
CapabilityDemoteToHelperInvocationEXT = 5379,
|
||||
CapabilityBindlessTextureNV = 5390,
|
||||
CapabilitySubgroupShuffleINTEL = 5568,
|
||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||
@ -1029,6 +1047,7 @@ enum Capability {
|
||||
CapabilityFPGAMemoryAttributesINTEL = 5824,
|
||||
CapabilityFPFastMathModeINTEL = 5837,
|
||||
CapabilityArbitraryPrecisionIntegersINTEL = 5844,
|
||||
CapabilityArbitraryPrecisionFloatingPointINTEL = 5845,
|
||||
CapabilityUnstructuredLoopControlsINTEL = 5886,
|
||||
CapabilityFPGALoopControlsINTEL = 5888,
|
||||
CapabilityKernelAttributesINTEL = 5892,
|
||||
@ -1037,14 +1056,26 @@ enum Capability {
|
||||
CapabilityFPGAClusterAttributesINTEL = 5904,
|
||||
CapabilityLoopFuseINTEL = 5906,
|
||||
CapabilityFPGABufferLocationINTEL = 5920,
|
||||
CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||
CapabilityUSMStorageClassesINTEL = 5935,
|
||||
CapabilityIOPipesINTEL = 5943,
|
||||
CapabilityBlockingPipesINTEL = 5945,
|
||||
CapabilityFPGARegINTEL = 5948,
|
||||
CapabilityDotProductInputAll = 6016,
|
||||
CapabilityDotProductInputAllKHR = 6016,
|
||||
CapabilityDotProductInput4x8Bit = 6017,
|
||||
CapabilityDotProductInput4x8BitKHR = 6017,
|
||||
CapabilityDotProductInput4x8BitPacked = 6018,
|
||||
CapabilityDotProductInput4x8BitPackedKHR = 6018,
|
||||
CapabilityDotProduct = 6019,
|
||||
CapabilityDotProductKHR = 6019,
|
||||
CapabilityBitInstructions = 6025,
|
||||
CapabilityAtomicFloat32AddEXT = 6033,
|
||||
CapabilityAtomicFloat64AddEXT = 6034,
|
||||
CapabilityLongConstantCompositeINTEL = 6089,
|
||||
CapabilityOptNoneINTEL = 6094,
|
||||
CapabilityAtomicFloat16AddEXT = 6095,
|
||||
CapabilityDebugInfoModuleINTEL = 6114,
|
||||
CapabilityMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -1123,6 +1154,32 @@ enum FPOperationMode {
|
||||
FPOperationModeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
enum QuantizationModes {
|
||||
QuantizationModesTRN = 0,
|
||||
QuantizationModesTRN_ZERO = 1,
|
||||
QuantizationModesRND = 2,
|
||||
QuantizationModesRND_ZERO = 3,
|
||||
QuantizationModesRND_INF = 4,
|
||||
QuantizationModesRND_MIN_INF = 5,
|
||||
QuantizationModesRND_CONV = 6,
|
||||
QuantizationModesRND_CONV_ODD = 7,
|
||||
QuantizationModesMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
enum OverflowModes {
|
||||
OverflowModesWRAP = 0,
|
||||
OverflowModesSAT = 1,
|
||||
OverflowModesSAT_ZERO = 2,
|
||||
OverflowModesSAT_SYM = 3,
|
||||
OverflowModesMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
enum PackedVectorFormat {
|
||||
PackedVectorFormatPackedVectorFormat4x8Bit = 0,
|
||||
PackedVectorFormatPackedVectorFormat4x8BitKHR = 0,
|
||||
PackedVectorFormatMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
enum Op {
|
||||
OpNop = 0,
|
||||
OpUndef = 1,
|
||||
@ -1480,6 +1537,18 @@ enum Op {
|
||||
OpConvertUToAccelerationStructureKHR = 4447,
|
||||
OpIgnoreIntersectionKHR = 4448,
|
||||
OpTerminateRayKHR = 4449,
|
||||
OpSDot = 4450,
|
||||
OpSDotKHR = 4450,
|
||||
OpUDot = 4451,
|
||||
OpUDotKHR = 4451,
|
||||
OpSUDot = 4452,
|
||||
OpSUDotKHR = 4452,
|
||||
OpSDotAccSat = 4453,
|
||||
OpSDotAccSatKHR = 4453,
|
||||
OpUDotAccSat = 4454,
|
||||
OpUDotAccSatKHR = 4454,
|
||||
OpSUDotAccSat = 4455,
|
||||
OpSUDotAccSatKHR = 4455,
|
||||
OpTypeRayQueryKHR = 4472,
|
||||
OpRayQueryInitializeKHR = 4473,
|
||||
OpRayQueryTerminateKHR = 4474,
|
||||
@ -1518,8 +1587,16 @@ enum Op {
|
||||
OpCooperativeMatrixLengthNV = 5362,
|
||||
OpBeginInvocationInterlockEXT = 5364,
|
||||
OpEndInvocationInterlockEXT = 5365,
|
||||
OpDemoteToHelperInvocation = 5380,
|
||||
OpDemoteToHelperInvocationEXT = 5380,
|
||||
OpIsHelperInvocationEXT = 5381,
|
||||
OpConvertUToImageNV = 5391,
|
||||
OpConvertUToSamplerNV = 5392,
|
||||
OpConvertImageToUNV = 5393,
|
||||
OpConvertSamplerToUNV = 5394,
|
||||
OpConvertUToSampledImageNV = 5395,
|
||||
OpConvertSampledImageToUNV = 5396,
|
||||
OpSamplerImageAddressingModeNV = 5397,
|
||||
OpSubgroupShuffleINTEL = 5571,
|
||||
OpSubgroupShuffleDownINTEL = 5572,
|
||||
OpSubgroupShuffleUpINTEL = 5573,
|
||||
@ -1544,7 +1621,7 @@ enum Op {
|
||||
OpUSubSatINTEL = 5596,
|
||||
OpIMul32x16INTEL = 5597,
|
||||
OpUMul32x16INTEL = 5598,
|
||||
OpConstFunctionPointerINTEL = 5600,
|
||||
OpConstantFunctionPointerINTEL = 5600,
|
||||
OpFunctionPointerCallINTEL = 5601,
|
||||
OpAsmTargetINTEL = 5609,
|
||||
OpAsmINTEL = 5610,
|
||||
@ -1678,7 +1755,59 @@ enum Op {
|
||||
OpVariableLengthArrayINTEL = 5818,
|
||||
OpSaveMemoryINTEL = 5819,
|
||||
OpRestoreMemoryINTEL = 5820,
|
||||
OpArbitraryFloatSinCosPiINTEL = 5840,
|
||||
OpArbitraryFloatCastINTEL = 5841,
|
||||
OpArbitraryFloatCastFromIntINTEL = 5842,
|
||||
OpArbitraryFloatCastToIntINTEL = 5843,
|
||||
OpArbitraryFloatAddINTEL = 5846,
|
||||
OpArbitraryFloatSubINTEL = 5847,
|
||||
OpArbitraryFloatMulINTEL = 5848,
|
||||
OpArbitraryFloatDivINTEL = 5849,
|
||||
OpArbitraryFloatGTINTEL = 5850,
|
||||
OpArbitraryFloatGEINTEL = 5851,
|
||||
OpArbitraryFloatLTINTEL = 5852,
|
||||
OpArbitraryFloatLEINTEL = 5853,
|
||||
OpArbitraryFloatEQINTEL = 5854,
|
||||
OpArbitraryFloatRecipINTEL = 5855,
|
||||
OpArbitraryFloatRSqrtINTEL = 5856,
|
||||
OpArbitraryFloatCbrtINTEL = 5857,
|
||||
OpArbitraryFloatHypotINTEL = 5858,
|
||||
OpArbitraryFloatSqrtINTEL = 5859,
|
||||
OpArbitraryFloatLogINTEL = 5860,
|
||||
OpArbitraryFloatLog2INTEL = 5861,
|
||||
OpArbitraryFloatLog10INTEL = 5862,
|
||||
OpArbitraryFloatLog1pINTEL = 5863,
|
||||
OpArbitraryFloatExpINTEL = 5864,
|
||||
OpArbitraryFloatExp2INTEL = 5865,
|
||||
OpArbitraryFloatExp10INTEL = 5866,
|
||||
OpArbitraryFloatExpm1INTEL = 5867,
|
||||
OpArbitraryFloatSinINTEL = 5868,
|
||||
OpArbitraryFloatCosINTEL = 5869,
|
||||
OpArbitraryFloatSinCosINTEL = 5870,
|
||||
OpArbitraryFloatSinPiINTEL = 5871,
|
||||
OpArbitraryFloatCosPiINTEL = 5872,
|
||||
OpArbitraryFloatASinINTEL = 5873,
|
||||
OpArbitraryFloatASinPiINTEL = 5874,
|
||||
OpArbitraryFloatACosINTEL = 5875,
|
||||
OpArbitraryFloatACosPiINTEL = 5876,
|
||||
OpArbitraryFloatATanINTEL = 5877,
|
||||
OpArbitraryFloatATanPiINTEL = 5878,
|
||||
OpArbitraryFloatATan2INTEL = 5879,
|
||||
OpArbitraryFloatPowINTEL = 5880,
|
||||
OpArbitraryFloatPowRINTEL = 5881,
|
||||
OpArbitraryFloatPowNINTEL = 5882,
|
||||
OpLoopControlINTEL = 5887,
|
||||
OpFixedSqrtINTEL = 5923,
|
||||
OpFixedRecipINTEL = 5924,
|
||||
OpFixedRsqrtINTEL = 5925,
|
||||
OpFixedSinINTEL = 5926,
|
||||
OpFixedCosINTEL = 5927,
|
||||
OpFixedSinCosINTEL = 5928,
|
||||
OpFixedSinPiINTEL = 5929,
|
||||
OpFixedCosPiINTEL = 5930,
|
||||
OpFixedSinCosPiINTEL = 5931,
|
||||
OpFixedLogINTEL = 5932,
|
||||
OpFixedExpINTEL = 5933,
|
||||
OpPtrCastToCrossWorkgroupINTEL = 5934,
|
||||
OpCrossWorkgroupCastToPtrINTEL = 5938,
|
||||
OpReadPipeBlockingINTEL = 5946,
|
||||
@ -2070,6 +2199,12 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSDot: *hasResult = true; *hasResultType = true; break;
|
||||
case OpUDot: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSUDot: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||
case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
||||
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||
@ -2106,8 +2241,15 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break;
|
||||
case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
@ -2132,7 +2274,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
@ -2264,7 +2406,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
@ -2312,3 +2506,4 @@ inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShad
|
||||
} // end namespace spv
|
||||
|
||||
#endif // #ifndef spirv_HPP
|
||||
|
||||
|
||||
@ -767,6 +767,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
|
||||
} else if (strcmp(argv[1], "vulkan1.2") == 0) {
|
||||
setVulkanSpv();
|
||||
ClientVersion = glslang::EShTargetVulkan_1_2;
|
||||
} else if (strcmp(argv[1], "vulkan1.3") == 0) {
|
||||
setVulkanSpv();
|
||||
ClientVersion = glslang::EShTargetVulkan_1_3;
|
||||
} else if (strcmp(argv[1], "opengl") == 0) {
|
||||
setOpenGlSpv();
|
||||
ClientVersion = glslang::EShTargetOpenGL_450;
|
||||
@ -793,7 +796,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
|
||||
TargetVersion = glslang::EShTargetSpv_1_6;
|
||||
} else
|
||||
Error("--target-env expected one of: vulkan1.0, vulkan1.1, vulkan1.2,\n"
|
||||
"opengl, spirv1.0, spirv1.1, spirv1.2, spirv1.3,\n"
|
||||
"vulkan1.3, opengl, spirv1.0, spirv1.1, spirv1.2, spirv1.3,\n"
|
||||
"spirv1.4, spirv1.5 or spirv1.6");
|
||||
}
|
||||
bumpArg();
|
||||
@ -1019,6 +1022,10 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
|
||||
TargetLanguage = glslang::EShTargetSpv;
|
||||
TargetVersion = glslang::EShTargetSpv_1_5;
|
||||
break;
|
||||
case glslang::EShTargetVulkan_1_3:
|
||||
TargetLanguage = glslang::EShTargetSpv;
|
||||
TargetVersion = glslang::EShTargetSpv_1_6;
|
||||
break;
|
||||
case glslang::EShTargetOpenGL_450:
|
||||
TargetLanguage = glslang::EShTargetSpv;
|
||||
TargetVersion = glslang::EShTargetSpv_1_0;
|
||||
@ -1934,7 +1941,7 @@ void usage()
|
||||
" --sep synonym for --source-entrypoint\n"
|
||||
" --stdin read from stdin instead of from a file;\n"
|
||||
" requires providing the shader stage using -S\n"
|
||||
" --target-env {vulkan1.0 | vulkan1.1 | vulkan1.2 | opengl |\n"
|
||||
" --target-env {vulkan1.0 | vulkan1.1 | vulkan1.2 | vulkan1.3 | opengl |\n"
|
||||
" spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 |\n"
|
||||
" spirv1.5 | spirv1.6}\n"
|
||||
" Set the execution environment that the\n"
|
||||
@ -1945,6 +1952,7 @@ void usage()
|
||||
" * spirv1.0 under --target-env vulkan1.0\n"
|
||||
" * spirv1.3 under --target-env vulkan1.1\n"
|
||||
" * spirv1.5 under --target-env vulkan1.2\n"
|
||||
" * spirv1.6 under --target-env vulkan1.3\n"
|
||||
" Multiple --target-env can be specified.\n"
|
||||
" --variable-name <name>\n"
|
||||
" --vn <name> creates a C header file that contains a\n"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
hlsl.spv.1.6.discard.frag
|
||||
Shader version: 500
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: foo(f1; ( temp void)
|
||||
0:2 Function Parameters:
|
||||
@ -55,6 +56,7 @@ Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 500
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: foo(f1; ( temp void)
|
||||
0:2 Function Parameters:
|
||||
@ -114,7 +116,7 @@ Shader version: 500
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 42
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 10 "foo(f1;"
|
||||
|
||||
@ -7,7 +7,7 @@ spv.1.6.conditionalDiscard.frag
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 13 17 34
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 9 "v"
|
||||
@ -17,6 +17,7 @@ spv.1.6.conditionalDiscard.frag
|
||||
Decorate 13(tex) DescriptorSet 0
|
||||
Decorate 13(tex) Binding 0
|
||||
Decorate 17(coord) Location 0
|
||||
Decorate 34(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -7,7 +7,7 @@ spv.1.6.helperInvocation.frag
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 15
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source ESSL 310
|
||||
Name 4 "main"
|
||||
Name 8 "gl_HelperInvocation"
|
||||
|
||||
@ -273,6 +273,8 @@ static glslang::EShTargetClientVersion c_shader_client_version(glslang_target_cl
|
||||
return glslang::EShTargetVulkan_1_1;
|
||||
case GLSLANG_TARGET_VULKAN_1_2:
|
||||
return glslang::EShTargetVulkan_1_2;
|
||||
case GLSLANG_TARGET_VULKAN_1_3:
|
||||
return glslang::EShTargetVulkan_1_3;
|
||||
case GLSLANG_TARGET_OPENGL_450:
|
||||
return glslang::EShTargetOpenGL_450;
|
||||
default:
|
||||
|
||||
@ -101,8 +101,9 @@ typedef enum {
|
||||
GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
|
||||
GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
|
||||
GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
|
||||
GLSLANG_TARGET_VULKAN_1_3 = (1 << 22) | (3 << 12),
|
||||
GLSLANG_TARGET_OPENGL_450 = 450,
|
||||
LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4),
|
||||
LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 5),
|
||||
} glslang_target_client_version_t;
|
||||
|
||||
/* SH_TARGET_LanguageVersion counterpart */
|
||||
|
||||
@ -419,6 +419,9 @@ public:
|
||||
case EShTargetVulkan_1_2:
|
||||
processes.addProcess("target-env vulkan1.2");
|
||||
break;
|
||||
case EShTargetVulkan_1_3:
|
||||
processes.addProcess("target-env vulkan1.3");
|
||||
break;
|
||||
default:
|
||||
processes.addProcess("target-env vulkanUnknown");
|
||||
break;
|
||||
|
||||
@ -162,16 +162,13 @@ typedef enum {
|
||||
LAST_ELEMENT_MARKER(EShTargetCount),
|
||||
} EShTargetLanguage;
|
||||
|
||||
// TODO(greg-lunarg): Fix non-determinism problem with Universal
|
||||
// https://github.com/KhronosGroup/glslang/issues/2858
|
||||
|
||||
typedef enum {
|
||||
EShTargetUniversal = 0, // Universal - Do not use, see comment above
|
||||
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
|
||||
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
|
||||
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
|
||||
EShTargetVulkan_1_3 = (1 << 22) | (3 << 12), // Vulkan 1.3
|
||||
EShTargetOpenGL_450 = 450, // OpenGL
|
||||
LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4),
|
||||
LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 5),
|
||||
} EShTargetClientVersion;
|
||||
|
||||
typedef EShTargetClientVersion EshTargetClientVersion;
|
||||
|
||||
@ -59,7 +59,7 @@ std::string FileNameAsCustomTestSuffix(
|
||||
|
||||
using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
//using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
@ -82,14 +82,12 @@ TEST_P(HlslVulkan1_1CompileTest, FromFile)
|
||||
Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||
}
|
||||
|
||||
// TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
|
||||
|
||||
//TEST_P(HlslSpv1_6CompileTest, FromFile)
|
||||
//{
|
||||
// loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
// Source::HLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
|
||||
// Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||
//}
|
||||
TEST_P(HlslSpv1_6CompileTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_3, glslang::EShTargetSpv_1_6,
|
||||
Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||
}
|
||||
|
||||
TEST_P(HlslCompileAndFlattenTest, FromFile)
|
||||
{
|
||||
@ -461,13 +459,13 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// clang-format on
|
||||
|
||||
// clang-format off
|
||||
//INSTANTIATE_TEST_SUITE_P(
|
||||
// ToSpirv, HlslSpv1_6CompileTest,
|
||||
// ::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
// {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}
|
||||
// }),
|
||||
// FileNameAsCustomTestSuffix
|
||||
//);
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
ToSpirv, HlslSpv1_6CompileTest,
|
||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
{"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
// clang-format on
|
||||
|
||||
// clang-format off
|
||||
|
||||
@ -69,7 +69,7 @@ using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithPara
|
||||
using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileToSpirv14Test = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
//using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
@ -123,14 +123,12 @@ TEST_P(CompileToSpirv14Test, FromFile)
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
// TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
|
||||
|
||||
//TEST_P(CompileToSpirv16Test, FromFile)
|
||||
//{
|
||||
// loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
// Source::GLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
|
||||
// Target::Spv);
|
||||
//}
|
||||
TEST_P(CompileToSpirv16Test, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_3, glslang::EShTargetSpv_1_6,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully
|
||||
// generate SPIR-V.
|
||||
@ -632,15 +630,15 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
);
|
||||
|
||||
// clang-format off
|
||||
//INSTANTIATE_TEST_SUITE_P(
|
||||
// Glsl, CompileToSpirv16Test,
|
||||
// ::testing::ValuesIn(std::vector<std::string>({
|
||||
// "spv.1.6.conditionalDiscard.frag",
|
||||
// "spv.1.6.helperInvocation.frag",
|
||||
// "spv.1.6.specConstant.comp",
|
||||
// })),
|
||||
// FileNameAsCustomTestSuffix
|
||||
//);
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Glsl, CompileToSpirv16Test,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
"spv.1.6.conditionalDiscard.frag",
|
||||
"spv.1.6.helperInvocation.frag",
|
||||
"spv.1.6.specConstant.comp",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
|
||||
// clang-format off
|
||||
|
||||
@ -5,14 +5,14 @@
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||
"subdir" : "External/spirv-tools",
|
||||
"commit" : "7d768812e20296c877a44ce0633d71f952fbf83c"
|
||||
"commit" : "73735db943d7165d725883a1da0ad9eac79c1e34"
|
||||
},
|
||||
{
|
||||
"name" : "spirv-tools/external/spirv-headers",
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||
"commit" : "eddd4dfc930f1374a70797460240a501c7d333f7"
|
||||
"commit" : "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user