diff options
author | John Kessenich <johnkslang@users.noreply.github.com> | 2020-03-04 23:55:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 23:55:33 -0700 |
commit | d9ce9ca52ffea72d45b313d06867d5312f222aaa (patch) | |
tree | 4bee807ef285bf367808dda8db91bd1ec48aa321 | |
parent | 0a7fc45259910f07f00c5a3fa10be5678bee1f83 (diff) | |
parent | e814bf0067ef64f3544d94bf3d46b2cf9d0c97f1 (diff) | |
download | SPIRV-Headers-d9ce9ca52ffea72d45b313d06867d5312f222aaa.tar.gz |
Merge pull request #145 from jeffbolznv/nonsemantic_debugprintf
Add NonSemantic.DebugPrintf JSON/header
-rw-r--r-- | include/spirv/unified1/AMD_gcn_shader.h | 2 | ||||
-rw-r--r-- | include/spirv/unified1/AMD_shader_ballot.h | 2 | ||||
-rw-r--r-- | include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h | 2 | ||||
-rw-r--r-- | include/spirv/unified1/AMD_shader_trinary_minmax.h | 2 | ||||
-rw-r--r-- | include/spirv/unified1/DebugInfo.h | 12 | ||||
-rw-r--r-- | include/spirv/unified1/NonSemanticDebugPrintf.h | 50 | ||||
-rw-r--r-- | include/spirv/unified1/OpenCLDebugInfo100.h | 14 | ||||
-rw-r--r-- | include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json | 13 | ||||
-rwxr-xr-x | tools/buildHeaders/bin/generate_language_headers.py | 2 | ||||
-rwxr-xr-x | tools/buildHeaders/bin/makeExtinstHeaders.py | 1 |
10 files changed, 82 insertions, 18 deletions
diff --git a/include/spirv/unified1/AMD_gcn_shader.h b/include/spirv/unified1/AMD_gcn_shader.h index 0d311a1..80165ae 100644 --- a/include/spirv/unified1/AMD_gcn_shader.h +++ b/include/spirv/unified1/AMD_gcn_shader.h @@ -41,7 +41,7 @@ enum AMD_gcn_shaderInstructions { AMD_gcn_shaderCubeFaceIndexAMD = 1, AMD_gcn_shaderCubeFaceCoordAMD = 2, AMD_gcn_shaderTimeAMD = 3, - AMD_gcn_shaderInstructionsMax = 0x7ffffff + AMD_gcn_shaderInstructionsMax = 0x7fffffff }; diff --git a/include/spirv/unified1/AMD_shader_ballot.h b/include/spirv/unified1/AMD_shader_ballot.h index 59b2aaf..8a8bb6e 100644 --- a/include/spirv/unified1/AMD_shader_ballot.h +++ b/include/spirv/unified1/AMD_shader_ballot.h @@ -42,7 +42,7 @@ enum AMD_shader_ballotInstructions { AMD_shader_ballotSwizzleInvocationsMaskedAMD = 2, AMD_shader_ballotWriteInvocationAMD = 3, AMD_shader_ballotMbcntAMD = 4, - AMD_shader_ballotInstructionsMax = 0x7ffffff + AMD_shader_ballotInstructionsMax = 0x7fffffff }; diff --git a/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h b/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h index aa3d52b..12b6480 100644 --- a/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h +++ b/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h @@ -39,7 +39,7 @@ enum { enum AMD_shader_explicit_vertex_parameterInstructions { AMD_shader_explicit_vertex_parameterInterpolateAtVertexAMD = 1, - AMD_shader_explicit_vertex_parameterInstructionsMax = 0x7ffffff + AMD_shader_explicit_vertex_parameterInstructionsMax = 0x7fffffff }; diff --git a/include/spirv/unified1/AMD_shader_trinary_minmax.h b/include/spirv/unified1/AMD_shader_trinary_minmax.h index 8b49280..1b14997 100644 --- a/include/spirv/unified1/AMD_shader_trinary_minmax.h +++ b/include/spirv/unified1/AMD_shader_trinary_minmax.h @@ -47,7 +47,7 @@ enum AMD_shader_trinary_minmaxInstructions { AMD_shader_trinary_minmaxFMid3AMD = 7, AMD_shader_trinary_minmaxUMid3AMD = 8, AMD_shader_trinary_minmaxSMid3AMD = 9, - AMD_shader_trinary_minmaxInstructionsMax = 0x7ffffff + AMD_shader_trinary_minmaxInstructionsMax = 0x7fffffff }; diff --git a/include/spirv/unified1/DebugInfo.h b/include/spirv/unified1/DebugInfo.h index c8e26f1..c50a131 100644 --- a/include/spirv/unified1/DebugInfo.h +++ b/include/spirv/unified1/DebugInfo.h @@ -73,7 +73,7 @@ enum DebugInfoInstructions { DebugInfoDebugExpression = 31, DebugInfoDebugMacroDef = 32, DebugInfoDebugMacroUndef = 33, - DebugInfoInstructionsMax = 0x7ffffff + DebugInfoInstructionsMax = 0x7fffffff }; @@ -93,7 +93,7 @@ enum DebugInfoDebugInfoFlags { DebugInfoFlagLValueReference = 0x800, DebugInfoFlagRValueReference = 0x1000, DebugInfoFlagIsOptimized = 0x2000, - DebugInfoDebugInfoFlagsMax = 0x7ffffff + DebugInfoDebugInfoFlagsMax = 0x7fffffff }; enum DebugInfoDebugBaseTypeAttributeEncoding { @@ -105,21 +105,21 @@ enum DebugInfoDebugBaseTypeAttributeEncoding { DebugInfoSignedChar = 6, DebugInfoUnsigned = 7, DebugInfoUnsignedChar = 8, - DebugInfoDebugBaseTypeAttributeEncodingMax = 0x7ffffff + DebugInfoDebugBaseTypeAttributeEncodingMax = 0x7fffffff }; enum DebugInfoDebugCompositeType { DebugInfoClass = 0, DebugInfoStructure = 1, DebugInfoUnion = 2, - DebugInfoDebugCompositeTypeMax = 0x7ffffff + DebugInfoDebugCompositeTypeMax = 0x7fffffff }; enum DebugInfoDebugTypeQualifier { DebugInfoConstType = 0, DebugInfoVolatileType = 1, DebugInfoRestrictType = 2, - DebugInfoDebugTypeQualifierMax = 0x7ffffff + DebugInfoDebugTypeQualifierMax = 0x7fffffff }; enum DebugInfoDebugOperation { @@ -132,7 +132,7 @@ enum DebugInfoDebugOperation { DebugInfoXderef = 6, DebugInfoStackValue = 7, DebugInfoConstu = 8, - DebugInfoDebugOperationMax = 0x7ffffff + DebugInfoDebugOperationMax = 0x7fffffff }; diff --git a/include/spirv/unified1/NonSemanticDebugPrintf.h b/include/spirv/unified1/NonSemanticDebugPrintf.h new file mode 100644 index 0000000..83796d7 --- /dev/null +++ b/include/spirv/unified1/NonSemanticDebugPrintf.h @@ -0,0 +1,50 @@ +// Copyright (c) 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/ +// +// 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 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ +#define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + NonSemanticDebugPrintfRevision = 1, + NonSemanticDebugPrintfRevision_BitWidthPadding = 0x7fffffff +}; + +enum NonSemanticDebugPrintfInstructions { + NonSemanticDebugPrintfDebugPrintf = 1, + NonSemanticDebugPrintfInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ diff --git a/include/spirv/unified1/OpenCLDebugInfo100.h b/include/spirv/unified1/OpenCLDebugInfo100.h index 057580e..1149980 100644 --- a/include/spirv/unified1/OpenCLDebugInfo100.h +++ b/include/spirv/unified1/OpenCLDebugInfo100.h @@ -75,7 +75,7 @@ enum OpenCLDebugInfo100Instructions { OpenCLDebugInfo100DebugMacroUndef = 33, OpenCLDebugInfo100DebugImportedEntity = 34, OpenCLDebugInfo100DebugSource = 35, - OpenCLDebugInfo100InstructionsMax = 0x7ffffff + OpenCLDebugInfo100InstructionsMax = 0x7fffffff }; @@ -98,7 +98,7 @@ enum OpenCLDebugInfo100DebugInfoFlags { OpenCLDebugInfo100FlagIsEnumClass = 0x4000, OpenCLDebugInfo100FlagTypePassByValue = 0x8000, OpenCLDebugInfo100FlagTypePassByReference = 0x10000, - OpenCLDebugInfo100DebugInfoFlagsMax = 0x7ffffff + OpenCLDebugInfo100DebugInfoFlagsMax = 0x7fffffff }; enum OpenCLDebugInfo100DebugBaseTypeAttributeEncoding { @@ -110,14 +110,14 @@ enum OpenCLDebugInfo100DebugBaseTypeAttributeEncoding { OpenCLDebugInfo100SignedChar = 5, OpenCLDebugInfo100Unsigned = 6, OpenCLDebugInfo100UnsignedChar = 7, - OpenCLDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7ffffff + OpenCLDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff }; enum OpenCLDebugInfo100DebugCompositeType { OpenCLDebugInfo100Class = 0, OpenCLDebugInfo100Structure = 1, OpenCLDebugInfo100Union = 2, - OpenCLDebugInfo100DebugCompositeTypeMax = 0x7ffffff + OpenCLDebugInfo100DebugCompositeTypeMax = 0x7fffffff }; enum OpenCLDebugInfo100DebugTypeQualifier { @@ -125,7 +125,7 @@ enum OpenCLDebugInfo100DebugTypeQualifier { OpenCLDebugInfo100VolatileType = 1, OpenCLDebugInfo100RestrictType = 2, OpenCLDebugInfo100AtomicType = 3, - OpenCLDebugInfo100DebugTypeQualifierMax = 0x7ffffff + OpenCLDebugInfo100DebugTypeQualifierMax = 0x7fffffff }; enum OpenCLDebugInfo100DebugOperation { @@ -139,13 +139,13 @@ enum OpenCLDebugInfo100DebugOperation { OpenCLDebugInfo100StackValue = 7, OpenCLDebugInfo100Constu = 8, OpenCLDebugInfo100Fragment = 9, - OpenCLDebugInfo100DebugOperationMax = 0x7ffffff + OpenCLDebugInfo100DebugOperationMax = 0x7fffffff }; enum OpenCLDebugInfo100DebugImportedEntity { OpenCLDebugInfo100ImportedModule = 0, OpenCLDebugInfo100ImportedDeclaration = 1, - OpenCLDebugInfo100DebugImportedEntityMax = 0x7ffffff + OpenCLDebugInfo100DebugImportedEntityMax = 0x7fffffff }; diff --git a/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json b/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json new file mode 100644 index 0000000..71fa711 --- /dev/null +++ b/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json @@ -0,0 +1,13 @@ +{ + "revision" : 1, + "instructions" : [ + { + "opname" : "DebugPrintf", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'Format'" }, + { "kind" : "IdRef", "quantifier" : "*" } + ] + } + ] +} diff --git a/tools/buildHeaders/bin/generate_language_headers.py b/tools/buildHeaders/bin/generate_language_headers.py index f43e52d..c56780c 100755 --- a/tools/buildHeaders/bin/generate_language_headers.py +++ b/tools/buildHeaders/bin/generate_language_headers.py @@ -184,7 +184,7 @@ class CLikeGenerator(LangGenerator): return 'enum {}{} {}'.format(prefix, name, '{') def enum_end(self, prefix, enum): - return ' {}{}Max = 0x7ffffff\n{};\n'.format(prefix, enum, '}') + return ' {}{}Max = 0x7fffffff\n{};\n'.format(prefix, enum, '}') def cpp_guard_preamble(self): return '#ifdef __cplusplus\nextern "C" {\n#endif\n' diff --git a/tools/buildHeaders/bin/makeExtinstHeaders.py b/tools/buildHeaders/bin/makeExtinstHeaders.py index 3c2ebd9..780e479 100755 --- a/tools/buildHeaders/bin/makeExtinstHeaders.py +++ b/tools/buildHeaders/bin/makeExtinstHeaders.py @@ -24,3 +24,4 @@ mk_extinst('AMD_gcn_shader', 'extinst.spv-amd-gcn-shader.grammar.json') mk_extinst('AMD_shader_ballot', 'extinst.spv-amd-shader-ballot.grammar.json') mk_extinst('AMD_shader_explicit_vertex_parameter', 'extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json') mk_extinst('AMD_shader_trinary_minmax', 'extinst.spv-amd-shader-trinary-minmax.grammar.json') +mk_extinst('NonSemanticDebugPrintf', 'extinst.nonsemantic.debugprintf.grammar.json') |