summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Rose <heroseh@protonmail.com>2023-05-31 07:36:32 +0100
committerHenry Rose <heroseh@protonmail.com>2023-05-31 07:36:32 +0100
commitf48f8eed17a0b6f3138dbe09ab4636025a9749b2 (patch)
tree781c64ed005d934e7a5cc9031c3dc95601a04fff
parent730800f6d85ef242904b6e09f4ee3b634778f40e (diff)
parent69155b22b3b1f2d0cfed48f59167d9792de1fd79 (diff)
downloadSPIRV-Headers-f48f8eed17a0b6f3138dbe09ab4636025a9749b2.tar.gz
SPIRV-Headers-f48f8eed17a0b6f3138dbe09ab4636025a9749b2.tar.bz2
SPIRV-Headers-f48f8eed17a0b6f3138dbe09ab4636025a9749b2.zip
Merge branch 'main' of https://github.com/KhronosGroup/SPIRV-Headers
-rw-r--r--.github/workflows/presubmit.yml3
-rw-r--r--include/spirv/spir-v.xml11
-rw-r--r--include/spirv/unified1/spirv.bf4
-rw-r--r--include/spirv/unified1/spirv.core.grammar.json39
-rw-r--r--include/spirv/unified1/spirv.cs4
-rw-r--r--include/spirv/unified1/spirv.h5
-rw-r--r--include/spirv/unified1/spirv.hpp5
-rw-r--r--include/spirv/unified1/spirv.hpp1185
-rw-r--r--include/spirv/unified1/spirv.json4
-rw-r--r--include/spirv/unified1/spirv.lua4
-rw-r--r--include/spirv/unified1/spirv.py4
-rw-r--r--include/spirv/unified1/spv.d4
-rw-r--r--tools/buildHeaders/header.cpp30
13 files changed, 147 insertions, 55 deletions
diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml
index d0811ae..306f50e 100644
--- a/.github/workflows/presubmit.yml
+++ b/.github/workflows/presubmit.yml
@@ -1,6 +1,9 @@
name: Presubmit
on: [push, pull_request]
+permissions:
+ contents: read
+
jobs:
build:
name: Build ${{ matrix.os }}
diff --git a/include/spirv/spir-v.xml b/include/spirv/spir-v.xml
index 20b94f2..48ba7b4 100644
--- a/include/spirv/spir-v.xml
+++ b/include/spirv/spir-v.xml
@@ -82,7 +82,7 @@
<id value="29" vendor="Mikkosoft Productions" tool="MSP Shader Compiler" comment="Contact Mikko Rasa, tdb@tdb.fi"/>
<id value="30" vendor="SpvGenTwo community" tool="SpvGenTwo SPIR-V IR Tools" comment="https://github.com/rAzoR8/SpvGenTwo"/>
<id value="31" vendor="Google" tool="Skia SkSL" comment="Contact Ethan Nicholas, ethannicholas@google.com"/>
- <id value="32" vendor="TornadoVM" tool="SPIRV Beehive Toolkit" comment="https://github.com/beehive-lab/spirv-beehive-toolkit"/>
+ <id value="32" vendor="TornadoVM" tool="Beehive SPIRV Toolkit" comment="https://github.com/beehive-lab/beehive-spirv-toolkit"/>
<id value="33" vendor="DragonJoker" tool="ShaderWriter" comment="Contact Sylvain Doremus, https://github.com/DragonJoker/ShaderWriter"/>
<id value="34" vendor="Rayan Hatout" tool="SPIRVSmith" comment="Contact Rayan Hatout rayan.hatout@gmail.com, Repo https://github.com/rayanht/SPIRVSmith"/>
<id value="35" vendor="Saarland University" tool="Shady" comment="Contact Hugo Devillers devillers@uni-saarland.de, Repo https://github.com/Hugobros3/shady"/>
@@ -141,14 +141,16 @@
<ids type="opcode" start="6144" end="6271" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="opcode" start="6272" end="6399" vendor="Huawei" comment="Contact wanghuilong2@xunweitech.com"/>
<ids type="opcode" start="6400" end="6463" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
- <ids type="opcode" start="6464" end="6527" vendor="Codeplay" comment="Contact duncan.brawley@codeplay.com"/>
+ <ids type="opcode" start="6464" end="6527" vendor="N/A" comment="Blank range to keep alignment with non-opcodes"/>
+ <ids type="opcode" start="6528" end="6591" vendor="Codeplay" comment="Contact duncan.brawley@codeplay.com"/>
+ <ids type="opcode" start="6592" end="6655" vendor="Saarland University" comment="Contact devillers@cg.uni-saarland.de"/>
<!-- Opcode enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
- <ids type="opcode" start="6528" end="65535" comment="Opcode range reservable for future use by vendors"/>
+ <ids type="opcode" start="6656" end="65535" comment="Opcode range reservable for future use by vendors"/>
<!-- End reservations of opcodes -->
@@ -173,13 +175,14 @@
<ids type="enumerant" start="6400" end="6463" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="enumerant" start="6464" end="6527" vendor="Mikkosoft Productions" comment="Contact Mikko Rasa, tdb@tdb.fi"/>
<ids type="enumerant" start="6528" end="6591" vendor="Codeplay" comment="Contact duncan.brawley@codeplay.com"/>
+ <ids type="enumerant" start="6592" end="6655" vendor="Saarland University" comment="Contact devillers@cg.uni-saarland.de"/>
<!-- Enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="enumerant" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
- <ids type="enumerant" start="6592" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
+ <ids type="enumerant" start="6656" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<!-- End reservations of enumerants -->
diff --git a/include/spirv/unified1/spirv.bf b/include/spirv/unified1/spirv.bf
index 4e40dea..9df763d 100644
--- a/include/spirv/unified1/spirv.bf
+++ b/include/spirv/unified1/spirv.bf
@@ -722,6 +722,7 @@ namespace Spv
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
+ HitTriangleVertexPositionsKHR = 5335,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -1084,6 +1085,7 @@ namespace Spv
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ RayTracingPositionFetchKHR = 5336,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
@@ -1104,6 +1106,7 @@ namespace Spv
RayTracingOpacityMicromapEXT = 5381,
ShaderInvocationReorderNV = 5383,
BindlessTextureNV = 5390,
+ RayQueryPositionFetchKHR = 5391,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1717,6 +1720,7 @@ namespace Spv
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json
index d6c5376..6908d84 100644
--- a/include/spirv/unified1/spirv.core.grammar.json
+++ b/include/spirv/unified1/spirv.core.grammar.json
@@ -5484,6 +5484,25 @@
"version" : "None"
},
{
+ "opname" : "OpRayQueryGetIntersectionTriangleVertexPositionsKHR",
+ "class" : "Reserved",
+ "opcode" : 5340,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryPositionFetchKHR" ],
+ "version" : "None"
+ },
+ {
"opname" : "OpTypeAccelerationStructureNV",
"class" : "Reserved",
"opcode" : 5341,
@@ -13542,6 +13561,12 @@
"version" : "None"
},
{
+ "enumerant" : "HitTriangleVertexPositionsKHR",
+ "value" : 5335,
+ "capabilities" : [ "RayTracingPositionFetchKHR" ],
+ "version" : "None"
+ },
+ {
"enumerant" : "IncomingRayFlagsNV",
"value" : 5351,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
@@ -14632,6 +14657,13 @@
"version" : "1.5"
},
{
+ "enumerant" : "RayTracingPositionFetchKHR",
+ "value" : 5336,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ],
+ "version" : "None"
+ },
+ {
"enumerant" : "RayTracingNV",
"value" : 5340,
"capabilities" : [ "Shader" ],
@@ -14763,6 +14795,13 @@
"version" : "None"
},
{
+ "enumerant" : "RayQueryPositionFetchKHR",
+ "value" : 5391,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ],
+ "version" : "None"
+ },
+ {
"enumerant" : "SubgroupShuffleINTEL",
"value" : 5568,
"extensions" : [ "SPV_INTEL_subgroups" ],
diff --git a/include/spirv/unified1/spirv.cs b/include/spirv/unified1/spirv.cs
index 16668dd..b65a738 100644
--- a/include/spirv/unified1/spirv.cs
+++ b/include/spirv/unified1/spirv.cs
@@ -721,6 +721,7 @@ namespace Spv
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
+ HitTriangleVertexPositionsKHR = 5335,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -1083,6 +1084,7 @@ namespace Spv
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ RayTracingPositionFetchKHR = 5336,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
@@ -1103,6 +1105,7 @@ namespace Spv
RayTracingOpacityMicromapEXT = 5381,
ShaderInvocationReorderNV = 5383,
BindlessTextureNV = 5390,
+ RayQueryPositionFetchKHR = 5391,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1716,6 +1719,7 @@ namespace Spv
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h
index f65936f..b204282 100644
--- a/include/spirv/unified1/spirv.h
+++ b/include/spirv/unified1/spirv.h
@@ -727,6 +727,7 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInHitKindKHR = 5333,
SpvBuiltInHitKindNV = 5333,
SpvBuiltInCurrentRayTimeNV = 5334,
+ SpvBuiltInHitTriangleVertexPositionsKHR = 5335,
SpvBuiltInIncomingRayFlagsKHR = 5351,
SpvBuiltInIncomingRayFlagsNV = 5351,
SpvBuiltInRayGeometryIndexKHR = 5352,
@@ -1083,6 +1084,7 @@ typedef enum SpvCapability_ {
SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ SpvCapabilityRayTracingPositionFetchKHR = 5336,
SpvCapabilityRayTracingNV = 5340,
SpvCapabilityRayTracingMotionBlurNV = 5341,
SpvCapabilityVulkanMemoryModel = 5345,
@@ -1103,6 +1105,7 @@ typedef enum SpvCapability_ {
SpvCapabilityRayTracingOpacityMicromapEXT = 5381,
SpvCapabilityShaderInvocationReorderNV = 5383,
SpvCapabilityBindlessTextureNV = 5390,
+ SpvCapabilityRayQueryPositionFetchKHR = 5391,
SpvCapabilitySubgroupShuffleINTEL = 5568,
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1714,6 +1717,7 @@ typedef enum SpvOp_ {
SpvOpTraceNV = 5337,
SpvOpTraceMotionNV = 5338,
SpvOpTraceRayMotionNV = 5339,
+ SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
SpvOpTypeAccelerationStructureKHR = 5341,
SpvOpTypeAccelerationStructureNV = 5341,
SpvOpExecuteCallableNV = 5344,
@@ -2430,6 +2434,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
+ case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp
index 6a14a8b..74b0f36 100644
--- a/include/spirv/unified1/spirv.hpp
+++ b/include/spirv/unified1/spirv.hpp
@@ -723,6 +723,7 @@ enum BuiltIn {
BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
BuiltInCurrentRayTimeNV = 5334,
+ BuiltInHitTriangleVertexPositionsKHR = 5335,
BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
BuiltInRayGeometryIndexKHR = 5352,
@@ -1079,6 +1080,7 @@ enum Capability {
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ CapabilityRayTracingPositionFetchKHR = 5336,
CapabilityRayTracingNV = 5340,
CapabilityRayTracingMotionBlurNV = 5341,
CapabilityVulkanMemoryModel = 5345,
@@ -1099,6 +1101,7 @@ enum Capability {
CapabilityRayTracingOpacityMicromapEXT = 5381,
CapabilityShaderInvocationReorderNV = 5383,
CapabilityBindlessTextureNV = 5390,
+ CapabilityRayQueryPositionFetchKHR = 5391,
CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1710,6 +1713,7 @@ enum Op {
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -2426,6 +2430,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;
diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11
index 7bd2910..561c1a8 100644
--- a/include/spirv/unified1/spirv.hpp11
+++ b/include/spirv/unified1/spirv.hpp11
@@ -723,6 +723,7 @@ enum class BuiltIn : unsigned {
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
+ HitTriangleVertexPositionsKHR = 5335,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -1079,6 +1080,7 @@ enum class Capability : unsigned {
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ RayTracingPositionFetchKHR = 5336,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
@@ -1099,6 +1101,7 @@ enum class Capability : unsigned {
RayTracingOpacityMicromapEXT = 5381,
ShaderInvocationReorderNV = 5383,
BindlessTextureNV = 5390,
+ RayQueryPositionFetchKHR = 5391,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1710,6 +1713,7 @@ enum class Op : unsigned {
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -2426,6 +2430,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
+ case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@@ -2701,46 +2706,46 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
// 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)); }
+constexpr ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
+constexpr ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
+constexpr ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
+constexpr ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
+constexpr FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
+constexpr FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
+constexpr FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
+constexpr FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
+constexpr SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
+constexpr SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
+constexpr SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
+constexpr SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
+constexpr LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
+constexpr LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
+constexpr LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
+constexpr LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
+constexpr FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
+constexpr FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
+constexpr FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
+constexpr FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
+constexpr MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
+constexpr MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
+constexpr MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
+constexpr MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
+constexpr MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
+constexpr MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
+constexpr MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
+constexpr MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
+constexpr KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+constexpr KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
+constexpr KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
+constexpr KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
+constexpr RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
+constexpr RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
+constexpr RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
+constexpr RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
+constexpr FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
+constexpr FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
+constexpr FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
+constexpr FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
} // end namespace spv
diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json
index 01710c8..973109b 100644
--- a/include/spirv/unified1/spirv.json
+++ b/include/spirv/unified1/spirv.json
@@ -752,6 +752,7 @@
"HitKindKHR": 5333,
"HitKindNV": 5333,
"CurrentRayTimeNV": 5334,
+ "HitTriangleVertexPositionsKHR": 5335,
"IncomingRayFlagsKHR": 5351,
"IncomingRayFlagsNV": 5351,
"RayGeometryIndexKHR": 5352,
@@ -1059,6 +1060,7 @@
"UniformTexelBufferArrayNonUniformIndexingEXT": 5311,
"StorageTexelBufferArrayNonUniformIndexing": 5312,
"StorageTexelBufferArrayNonUniformIndexingEXT": 5312,
+ "RayTracingPositionFetchKHR": 5336,
"RayTracingNV": 5340,
"RayTracingMotionBlurNV": 5341,
"VulkanMemoryModel": 5345,
@@ -1079,6 +1081,7 @@
"RayTracingOpacityMicromapEXT": 5381,
"ShaderInvocationReorderNV": 5383,
"BindlessTextureNV": 5390,
+ "RayQueryPositionFetchKHR": 5391,
"SubgroupShuffleINTEL": 5568,
"SubgroupBufferBlockIOINTEL": 5569,
"SubgroupImageBlockIOINTEL": 5570,
@@ -1700,6 +1703,7 @@
"OpTraceNV": 5337,
"OpTraceMotionNV": 5338,
"OpTraceRayMotionNV": 5339,
+ "OpRayQueryGetIntersectionTriangleVertexPositionsKHR": 5340,
"OpTypeAccelerationStructureKHR": 5341,
"OpTypeAccelerationStructureNV": 5341,
"OpExecuteCallableNV": 5344,
diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua
index 1fa1142..acf7252 100644
--- a/include/spirv/unified1/spirv.lua
+++ b/include/spirv/unified1/spirv.lua
@@ -695,6 +695,7 @@ spv = {
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
+ HitTriangleVertexPositionsKHR = 5335,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -1041,6 +1042,7 @@ spv = {
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ RayTracingPositionFetchKHR = 5336,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
@@ -1061,6 +1063,7 @@ spv = {
RayTracingOpacityMicromapEXT = 5381,
ShaderInvocationReorderNV = 5383,
BindlessTextureNV = 5390,
+ RayQueryPositionFetchKHR = 5391,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1661,6 +1664,7 @@ spv = {
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py
index e67355f..d1e6104 100644
--- a/include/spirv/unified1/spirv.py
+++ b/include/spirv/unified1/spirv.py
@@ -695,6 +695,7 @@ spv = {
'HitKindKHR' : 5333,
'HitKindNV' : 5333,
'CurrentRayTimeNV' : 5334,
+ 'HitTriangleVertexPositionsKHR' : 5335,
'IncomingRayFlagsKHR' : 5351,
'IncomingRayFlagsNV' : 5351,
'RayGeometryIndexKHR' : 5352,
@@ -1041,6 +1042,7 @@ spv = {
'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311,
'StorageTexelBufferArrayNonUniformIndexing' : 5312,
'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312,
+ 'RayTracingPositionFetchKHR' : 5336,
'RayTracingNV' : 5340,
'RayTracingMotionBlurNV' : 5341,
'VulkanMemoryModel' : 5345,
@@ -1061,6 +1063,7 @@ spv = {
'RayTracingOpacityMicromapEXT' : 5381,
'ShaderInvocationReorderNV' : 5383,
'BindlessTextureNV' : 5390,
+ 'RayQueryPositionFetchKHR' : 5391,
'SubgroupShuffleINTEL' : 5568,
'SubgroupBufferBlockIOINTEL' : 5569,
'SubgroupImageBlockIOINTEL' : 5570,
@@ -1661,6 +1664,7 @@ spv = {
'OpTraceNV' : 5337,
'OpTraceMotionNV' : 5338,
'OpTraceRayMotionNV' : 5339,
+ 'OpRayQueryGetIntersectionTriangleVertexPositionsKHR' : 5340,
'OpTypeAccelerationStructureKHR' : 5341,
'OpTypeAccelerationStructureNV' : 5341,
'OpExecuteCallableNV' : 5344,
diff --git a/include/spirv/unified1/spv.d b/include/spirv/unified1/spv.d
index 6c3ec7b..4d92bf8 100644
--- a/include/spirv/unified1/spv.d
+++ b/include/spirv/unified1/spv.d
@@ -724,6 +724,7 @@ enum BuiltIn : uint
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
+ HitTriangleVertexPositionsKHR = 5335,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -1086,6 +1087,7 @@ enum Capability : uint
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+ RayTracingPositionFetchKHR = 5336,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
@@ -1106,6 +1108,7 @@ enum Capability : uint
RayTracingOpacityMicromapEXT = 5381,
ShaderInvocationReorderNV = 5383,
BindlessTextureNV = 5390,
+ RayQueryPositionFetchKHR = 5391,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1719,6 +1722,7 @@ enum Op : uint
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
+ OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp
index fbae044..4ee358b 100644
--- a/tools/buildHeaders/header.cpp
+++ b/tools/buildHeaders/header.cpp
@@ -574,13 +574,8 @@ namespace {
// C++ printer
class TPrinterCPP : public TPrinterCBase {
- private:
- void printPrologue(std::ostream& out) const override {
- TPrinterCBase::printPrologue(out);
- out << "namespace spv {\n\n";
- }
-
- void printEpilogue(std::ostream& out) const override {
+ protected:
+ void printMaskOperators(std::ostream& out, const std::string& specifiers) const {
const Json::Value& enums = spvRoot["spv"]["enum"];
out << "// Overload bitwise operators for mask bit combining\n\n";
@@ -593,20 +588,28 @@ namespace {
const auto typeName = opName + styleStr(enumMask);
// Overload operator|
- out << "inline " << typeName << " operator|(" << typeName << " a, " << typeName << " b) { return " <<
+ out << specifiers << " " << typeName << " operator|(" << typeName << " a, " << typeName << " b) { return " <<
typeName << "(unsigned(a) | unsigned(b)); }\n";
// Overload operator&
- out << "inline " << typeName << " operator&(" << typeName << " a, " << typeName << " b) { return " <<
+ out << specifiers << " " << typeName << " operator&(" << typeName << " a, " << typeName << " b) { return " <<
typeName << "(unsigned(a) & unsigned(b)); }\n";
// Overload operator^
- out << "inline " << typeName << " operator^(" << typeName << " a, " << typeName << " b) { return " <<
+ out << specifiers << " " << typeName << " operator^(" << typeName << " a, " << typeName << " b) { return " <<
typeName << "(unsigned(a) ^ unsigned(b)); }\n";
// Overload operator~
- out << "inline " << typeName << " operator~(" << typeName << " a) { return " <<
+ out << specifiers << " " << typeName << " operator~(" << typeName << " a) { return " <<
typeName << "(~unsigned(a)); }\n";
}
}
+ }
+ private:
+ void printPrologue(std::ostream& out) const override {
+ TPrinterCBase::printPrologue(out);
+ out << "namespace spv {\n\n";
+ }
+ void printEpilogue(std::ostream& out) const override {
+ printMaskOperators(out, "inline");
out << "\n} // end namespace spv\n\n";
out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
}
@@ -642,6 +645,11 @@ namespace {
// C++11 printer (uses enum classes)
class TPrinterCPP11 final : public TPrinterCPP {
private:
+ void printEpilogue(std::ostream& out) const override {
+ printMaskOperators(out, "constexpr");
+ out << "\n} // end namespace spv\n\n";
+ out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
+ }
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
return std::string("enum class ") + s + styleStr(style) + " : unsigned {\n";
}