Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ template("glslang_sources_common") {
"SPIRV/Logger.cpp",
"SPIRV/Logger.h",
"SPIRV/NonSemanticDebugPrintf.h",
"SPIRV/NonSemanticShaderDebugInfo100.h",
"SPIRV/NonSemanticShaderDebugInfo.h",
"SPIRV/SpvBuilder.cpp",
"SPIRV/SpvBuilder.h",
"SPIRV/SpvPostProcess.cpp",
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,24 @@ bison --defines=MachineIndependent/glslang_tab.cpp.h
The above command is also available in the bash script in `updateGrammar`,
when executed from the glslang subdirectory of the glslang repository.

### If you need to update the NonSemantic instruction headers

`SPIRV/NonSemanticShaderDebugInfo.h` and `SPIRV/NonSemanticDebugPrintf.h` are
local copies of the canonical headers from SPIRV-Headers. They are kept here
because the SPIRV-Headers include path is not unconditionally available in all
glslang build configurations (it is only present when `ENABLE_OPT` is on).

When SPIRV-Headers publishes a new version of either header, copy the updated
file from

```
External/spirv-tools/external/spirv-headers/include/spirv/unified1/
```

over the corresponding file in `SPIRV/`. After copying, verify that the build
still compiles and update the golden test output if instruction names or opcode
numbers changed.

### Building to WASM for the Web and Node
### Building a standalone JS/WASM library for the Web and Node

Expand Down
2 changes: 1 addition & 1 deletion SPIRV/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ set(SPIRV_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.ARM.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.QCOM.h
${CMAKE_CURRENT_SOURCE_DIR}/NonSemanticDebugPrintf.h
${CMAKE_CURRENT_SOURCE_DIR}/NonSemanticShaderDebugInfo100.h
${CMAKE_CURRENT_SOURCE_DIR}/NonSemanticShaderDebugInfo.h
PARENT_SCOPE)

set(PUBLIC_HEADERS
Expand Down
173 changes: 173 additions & 0 deletions SPIRV/NonSemanticShaderDebugInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
// Copyright (c) 2018 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_NonSemanticShaderDebugInfo_H_
#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo_H_

#ifdef __cplusplus
extern "C" {
#endif

enum {
NonSemanticShaderDebugInfoVersion = 101,
NonSemanticShaderDebugInfoVersion_BitWidthPadding = 0x7fffffff
};
enum {
NonSemanticShaderDebugInfoRevision = 6,
NonSemanticShaderDebugInfoRevision_BitWidthPadding = 0x7fffffff
};

enum NonSemanticShaderDebugInfoInstructions {
NonSemanticShaderDebugInfoDebugInfoNone = 0,
NonSemanticShaderDebugInfoDebugCompilationUnit = 1,
NonSemanticShaderDebugInfoDebugTypeBasic = 2,
NonSemanticShaderDebugInfoDebugTypePointer = 3,
NonSemanticShaderDebugInfoDebugTypeQualifier = 4,
NonSemanticShaderDebugInfoDebugTypeArray = 5,
NonSemanticShaderDebugInfoDebugTypeVector = 6,
NonSemanticShaderDebugInfoDebugTypedef = 7,
NonSemanticShaderDebugInfoDebugTypeFunction = 8,
NonSemanticShaderDebugInfoDebugTypeEnum = 9,
NonSemanticShaderDebugInfoDebugTypeComposite = 10,
NonSemanticShaderDebugInfoDebugTypeMember = 11,
NonSemanticShaderDebugInfoDebugTypeInheritance = 12,
NonSemanticShaderDebugInfoDebugTypePtrToMember = 13,
NonSemanticShaderDebugInfoDebugTypeTemplate = 14,
NonSemanticShaderDebugInfoDebugTypeTemplateParameter = 15,
NonSemanticShaderDebugInfoDebugTypeTemplateTemplateParameter = 16,
NonSemanticShaderDebugInfoDebugTypeTemplateParameterPack = 17,
NonSemanticShaderDebugInfoDebugGlobalVariable = 18,
NonSemanticShaderDebugInfoDebugFunctionDeclaration = 19,
NonSemanticShaderDebugInfoDebugFunction = 20,
NonSemanticShaderDebugInfoDebugLexicalBlock = 21,
NonSemanticShaderDebugInfoDebugLexicalBlockDiscriminator = 22,
NonSemanticShaderDebugInfoDebugScope = 23,
NonSemanticShaderDebugInfoDebugNoScope = 24,
NonSemanticShaderDebugInfoDebugInlinedAt = 25,
NonSemanticShaderDebugInfoDebugLocalVariable = 26,
NonSemanticShaderDebugInfoDebugInlinedVariable = 27,
NonSemanticShaderDebugInfoDebugDeclare = 28,
NonSemanticShaderDebugInfoDebugValue = 29,
NonSemanticShaderDebugInfoDebugOperation = 30,
NonSemanticShaderDebugInfoDebugExpression = 31,
NonSemanticShaderDebugInfoDebugMacroDef = 32,
NonSemanticShaderDebugInfoDebugMacroUndef = 33,
NonSemanticShaderDebugInfoDebugImportedEntity = 34,
NonSemanticShaderDebugInfoDebugSource = 35,
NonSemanticShaderDebugInfoDebugFunctionDefinition = 101,
NonSemanticShaderDebugInfoDebugSourceContinued = 102,
NonSemanticShaderDebugInfoDebugLine = 103,
NonSemanticShaderDebugInfoDebugNoLine = 104,
NonSemanticShaderDebugInfoDebugBuildIdentifier = 105,
NonSemanticShaderDebugInfoDebugStoragePath = 106,
NonSemanticShaderDebugInfoDebugEntryPoint = 107,
NonSemanticShaderDebugInfoDebugTypeMatrix = 108,
NonSemanticShaderDebugInfoDebugTypeVectorIdEXT = 109,
NonSemanticShaderDebugInfoDebugTypeCooperativeMatrixKHR = 110,
NonSemanticShaderDebugInfoInstructionsMax = 0x7fffffff
};


enum NonSemanticShaderDebugInfoDebugInfoFlags {
NonSemanticShaderDebugInfoNone = 0x0000,
NonSemanticShaderDebugInfoFlagIsProtected = 0x01,
NonSemanticShaderDebugInfoFlagIsPrivate = 0x02,
NonSemanticShaderDebugInfoFlagIsPublic = 0x03,
NonSemanticShaderDebugInfoFlagIsLocal = 0x04,
NonSemanticShaderDebugInfoFlagIsDefinition = 0x08,
NonSemanticShaderDebugInfoFlagFwdDecl = 0x10,
NonSemanticShaderDebugInfoFlagArtificial = 0x20,
NonSemanticShaderDebugInfoFlagExplicit = 0x40,
NonSemanticShaderDebugInfoFlagPrototyped = 0x80,
NonSemanticShaderDebugInfoFlagObjectPointer = 0x100,
NonSemanticShaderDebugInfoFlagStaticMember = 0x200,
NonSemanticShaderDebugInfoFlagIndirectVariable = 0x400,
NonSemanticShaderDebugInfoFlagLValueReference = 0x800,
NonSemanticShaderDebugInfoFlagRValueReference = 0x1000,
NonSemanticShaderDebugInfoFlagIsOptimized = 0x2000,
NonSemanticShaderDebugInfoFlagIsEnumClass = 0x4000,
NonSemanticShaderDebugInfoFlagTypePassByValue = 0x8000,
NonSemanticShaderDebugInfoFlagTypePassByReference = 0x10000,
NonSemanticShaderDebugInfoFlagUnknownPhysicalLayout = 0x20000,
NonSemanticShaderDebugInfoDebugInfoFlagsMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoBuildIdentifierFlags {
NonSemanticShaderDebugInfoIdentifierPossibleDuplicates = 0x01,
NonSemanticShaderDebugInfoBuildIdentifierFlagsMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoDebugBaseTypeAttributeEncoding {
NonSemanticShaderDebugInfoUnspecified = 0,
NonSemanticShaderDebugInfoAddress = 1,
NonSemanticShaderDebugInfoBoolean = 2,
NonSemanticShaderDebugInfoFloat = 3,
NonSemanticShaderDebugInfoSigned = 4,
NonSemanticShaderDebugInfoSignedChar = 5,
NonSemanticShaderDebugInfoUnsigned = 6,
NonSemanticShaderDebugInfoUnsignedChar = 7,
NonSemanticShaderDebugInfoDebugBaseTypeAttributeEncodingMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoDebugCompositeType {
NonSemanticShaderDebugInfoClass = 0,
NonSemanticShaderDebugInfoStructure = 1,
NonSemanticShaderDebugInfoUnion = 2,
NonSemanticShaderDebugInfoDebugCompositeTypeMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoDebugTypeQualifier {
NonSemanticShaderDebugInfoConstType = 0,
NonSemanticShaderDebugInfoVolatileType = 1,
NonSemanticShaderDebugInfoRestrictType = 2,
NonSemanticShaderDebugInfoAtomicType = 3,
NonSemanticShaderDebugInfoDebugTypeQualifierMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoDebugOperation {
NonSemanticShaderDebugInfoDeref = 0,
NonSemanticShaderDebugInfoPlus = 1,
NonSemanticShaderDebugInfoMinus = 2,
NonSemanticShaderDebugInfoPlusUconst = 3,
NonSemanticShaderDebugInfoBitPiece = 4,
NonSemanticShaderDebugInfoSwap = 5,
NonSemanticShaderDebugInfoXderef = 6,
NonSemanticShaderDebugInfoStackValue = 7,
NonSemanticShaderDebugInfoConstu = 8,
NonSemanticShaderDebugInfoFragment = 9,
NonSemanticShaderDebugInfoDebugOperationMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfoDebugImportedEntity {
NonSemanticShaderDebugInfoImportedModule = 0,
NonSemanticShaderDebugInfoImportedDeclaration = 1,
NonSemanticShaderDebugInfoDebugImportedEntityMax = 0x7fffffff
};


#ifdef __cplusplus
}
#endif

#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo_H_
171 changes: 0 additions & 171 deletions SPIRV/NonSemanticShaderDebugInfo100.h

This file was deleted.

Loading