commit
d4e4d00353
34 changed files with 1245 additions and 305 deletions
12
.github/workflows/continuous_deployment.yml
vendored
12
.github/workflows/continuous_deployment.yml
vendored
|
|
@ -41,8 +41,8 @@ jobs:
|
||||||
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
@ -105,8 +105,8 @@ jobs:
|
||||||
compiler: [{cc: clang, cxx: clang++}]
|
compiler: [{cc: clang, cxx: clang++}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
@ -162,8 +162,8 @@ jobs:
|
||||||
os: [{genus: windows-2019, family: windows}]
|
os: [{genus: windows-2019, family: windows}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
|
||||||
32
.github/workflows/continuous_integration.yml
vendored
32
.github/workflows/continuous_integration.yml
vendored
|
|
@ -17,8 +17,8 @@ jobs:
|
||||||
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
@ -53,8 +53,8 @@ jobs:
|
||||||
cmake_build_type: [Debug]
|
cmake_build_type: [Debug]
|
||||||
flags: ['-fsanitize=address', '-fsanitize=thread']
|
flags: ['-fsanitize=address', '-fsanitize=thread']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
@ -91,11 +91,11 @@ jobs:
|
||||||
name: Linux Backcompat
|
name: Linux Backcompat
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
with:
|
with:
|
||||||
cmakeVersion: 3.17.2
|
cmakeVersion: 3.17.2
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
|
|
@ -126,8 +126,8 @@ jobs:
|
||||||
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- run: ./update_glslang_sources.py
|
- run: ./update_glslang_sources.py
|
||||||
- run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON
|
- run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON
|
||||||
env:
|
env:
|
||||||
|
|
@ -150,8 +150,8 @@ jobs:
|
||||||
os: [{genus: windows-2019, family: windows}]
|
os: [{genus: windows-2019, family: windows}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
@ -168,8 +168,8 @@ jobs:
|
||||||
iOS:
|
iOS:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
||||||
with:
|
with:
|
||||||
|
|
@ -197,8 +197,8 @@ jobs:
|
||||||
# Test both to ensure we are compatible with either approach.
|
# Test both to ensure we are compatible with either approach.
|
||||||
LEGACY: [ON, OFF]
|
LEGACY: [ON, OFF]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
||||||
with:
|
with:
|
||||||
|
|
@ -220,11 +220,11 @@ jobs:
|
||||||
emscripten:
|
emscripten:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
- uses: lukka/get-cmake@c57ffe818cee3ee5f08fc1cc78c8bbede1cbbe59 # v3.29.3
|
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
4
.github/workflows/scorecard.yml
vendored
4
.github/workflows/scorecard.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|
@ -48,6 +48,6 @@ jobs:
|
||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
|
uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ set(PUBLIC_HEADERS
|
||||||
SPVRemapper.h)
|
SPVRemapper.h)
|
||||||
|
|
||||||
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
||||||
|
add_library(glslang::SPIRV ALIAS SPIRV)
|
||||||
set_target_properties(SPIRV PROPERTIES
|
set_target_properties(SPIRV PROPERTIES
|
||||||
FOLDER glslang
|
FOLDER glslang
|
||||||
POSITION_INDEPENDENT_CODE ON
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
|
@ -92,6 +93,7 @@ glslang_add_build_info_dependency(SPIRV)
|
||||||
|
|
||||||
if (ENABLE_SPVREMAPPER)
|
if (ENABLE_SPVREMAPPER)
|
||||||
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
||||||
|
add_library(glslang::SPVRemapper ALIAS SPVRemapper)
|
||||||
set_target_properties(SPVRemapper PROPERTIES
|
set_target_properties(SPVRemapper PROPERTIES
|
||||||
FOLDER glslang
|
FOLDER glslang
|
||||||
POSITION_INDEPENDENT_CODE ON
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,6 @@ static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader
|
||||||
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
|
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
|
||||||
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
|
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
|
||||||
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
||||||
|
static const char* const E_SPV_ARM_cooperative_matrix_layouts = "SPV_ARM_cooperative_matrix_layouts";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextEXT_H
|
#endif // #ifndef GLSLextEXT_H
|
||||||
|
|
|
||||||
|
|
@ -62,5 +62,6 @@ static const char* const E_SPV_KHR_maximal_reconvergence = "SPV_KHR_maxim
|
||||||
static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgroup_rotate";
|
static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgroup_rotate";
|
||||||
static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume";
|
static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume";
|
||||||
static const char* const E_SPV_EXT_replicated_composites = "SPV_EXT_replicated_composites";
|
static const char* const E_SPV_EXT_replicated_composites = "SPV_EXT_replicated_composites";
|
||||||
|
static const char* const E_SPV_KHR_relaxed_extended_instruction = "SPV_KHR_relaxed_extended_instruction";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextKHR_H
|
#endif // #ifndef GLSLextKHR_H
|
||||||
|
|
|
||||||
|
|
@ -3705,6 +3705,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
|
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||||
|
auto layout = builder.getConstantScalar(operands[3]);
|
||||||
|
if (layout == spv::CooperativeMatrixLayoutRowBlockedInterleavedARM ||
|
||||||
|
layout == spv::CooperativeMatrixLayoutColumnBlockedInterleavedARM) {
|
||||||
|
builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts);
|
||||||
|
builder.addCapability(spv::CapabilityCooperativeMatrixLayoutsARM);
|
||||||
|
}
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
} else {
|
} else {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
|
|
@ -3729,6 +3735,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object
|
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
if (node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||||
|
auto layout = builder.getConstantScalar(operands[3]);
|
||||||
|
if (layout == spv::CooperativeMatrixLayoutRowBlockedInterleavedARM ||
|
||||||
|
layout == spv::CooperativeMatrixLayoutColumnBlockedInterleavedARM) {
|
||||||
|
builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts);
|
||||||
|
builder.addCapability(spv::CapabilityCooperativeMatrixLayoutsARM);
|
||||||
|
}
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
} else {
|
} else {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,10 @@ Id Builder::makeForwardPointer(StorageClass storageClass)
|
||||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
module.mapInstruction(type);
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
if (emitNonSemanticShaderDebugInfo) {
|
||||||
|
const Id debugResultId = makeForwardPointerDebugType(storageClass);
|
||||||
|
debugId[type->getResultId()] = debugResultId;
|
||||||
|
}
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -204,6 +208,15 @@ Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardP
|
||||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
module.mapInstruction(type);
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
// If we are emitting nonsemantic debuginfo, we need to patch the debug pointer type
|
||||||
|
// that was emitted alongside the forward pointer, now that we have a pointee debug
|
||||||
|
// type for it to point to.
|
||||||
|
if (emitNonSemanticShaderDebugInfo) {
|
||||||
|
Instruction *debugForwardPointer = module.getInstruction(debugId[forwardPointerType]);
|
||||||
|
assert(debugId[pointee]);
|
||||||
|
debugForwardPointer->setIdOperand(2, debugId[pointee]);
|
||||||
|
}
|
||||||
|
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1045,6 +1058,29 @@ Id Builder::makePointerDebugType(StorageClass storageClass, Id const baseType)
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Emit a OpExtInstWithForwardRefsKHR nonsemantic instruction for a pointer debug type
|
||||||
|
// where we don't have the pointee yet. Since we don't have the pointee yet, it just
|
||||||
|
// points to itself and we rely on patching it later.
|
||||||
|
Id Builder::makeForwardPointerDebugType(StorageClass storageClass)
|
||||||
|
{
|
||||||
|
const Id scID = makeUintConstant(storageClass);
|
||||||
|
|
||||||
|
this->addExtension(spv::E_SPV_KHR_relaxed_extended_instruction);
|
||||||
|
|
||||||
|
Instruction *type = new Instruction(getUniqueId(), makeVoidType(), OpExtInstWithForwardRefsKHR);
|
||||||
|
type->addIdOperand(nonSemanticShaderDebugInfo);
|
||||||
|
type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypePointer);
|
||||||
|
type->addIdOperand(type->getResultId());
|
||||||
|
type->addIdOperand(scID);
|
||||||
|
type->addIdOperand(makeUintConstant(0));
|
||||||
|
|
||||||
|
groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypePointer].push_back(type);
|
||||||
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
return type->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
Id Builder::makeDebugSource(const Id fileName) {
|
Id Builder::makeDebugSource(const Id fileName) {
|
||||||
if (debugSourceId.find(fileName) != debugSourceId.end())
|
if (debugSourceId.find(fileName) != debugSourceId.end())
|
||||||
return debugSourceId[fileName];
|
return debugSourceId[fileName];
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,7 @@ public:
|
||||||
Id makeCompositeDebugType(std::vector<Id> const& memberTypes, char const*const name,
|
Id makeCompositeDebugType(std::vector<Id> const& memberTypes, char const*const name,
|
||||||
NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false);
|
NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false);
|
||||||
Id makePointerDebugType(StorageClass storageClass, Id const baseType);
|
Id makePointerDebugType(StorageClass storageClass, Id const baseType);
|
||||||
|
Id makeForwardPointerDebugType(StorageClass storageClass);
|
||||||
Id makeDebugSource(const Id fileName);
|
Id makeDebugSource(const Id fileName);
|
||||||
Id makeDebugCompilationUnit();
|
Id makeDebugCompilationUnit();
|
||||||
Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable);
|
Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable);
|
||||||
|
|
|
||||||
|
|
@ -1035,6 +1035,8 @@ const char* CapabilityString(int info)
|
||||||
case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT";
|
case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT";
|
||||||
case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT";
|
case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT";
|
||||||
|
|
||||||
|
case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM";
|
||||||
|
|
||||||
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
||||||
|
|
||||||
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
||||||
|
|
@ -1445,6 +1447,7 @@ const char* OpcodeString(int op)
|
||||||
case 4429: return "OpSubgroupAnyKHR";
|
case 4429: return "OpSubgroupAnyKHR";
|
||||||
case 4430: return "OpSubgroupAllEqualKHR";
|
case 4430: return "OpSubgroupAllEqualKHR";
|
||||||
case 4432: return "OpSubgroupReadInvocationKHR";
|
case 4432: return "OpSubgroupReadInvocationKHR";
|
||||||
|
case 4433: return "OpExtInstWithForwardRefsKHR";
|
||||||
|
|
||||||
case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR";
|
case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR";
|
||||||
case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR";
|
case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR";
|
||||||
|
|
@ -1896,6 +1899,10 @@ void Parameterize()
|
||||||
InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
|
InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
|
||||||
InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
|
InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
|
||||||
|
|
||||||
|
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandId, "'Set'");
|
||||||
|
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandLiteralNumber, "'Instruction'");
|
||||||
|
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
|
||||||
|
|
||||||
InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
|
InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
|
||||||
InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
|
InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
|
||||||
InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
|
InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
|
||||||
|
|
|
||||||
|
|
@ -1002,6 +1002,7 @@ enum Capability {
|
||||||
CapabilityTileImageColorReadAccessEXT = 4166,
|
CapabilityTileImageColorReadAccessEXT = 4166,
|
||||||
CapabilityTileImageDepthReadAccessEXT = 4167,
|
CapabilityTileImageDepthReadAccessEXT = 4167,
|
||||||
CapabilityTileImageStencilReadAccessEXT = 4168,
|
CapabilityTileImageStencilReadAccessEXT = 4168,
|
||||||
|
CapabilityCooperativeMatrixLayoutsARM = 4201,
|
||||||
CapabilityFragmentShadingRateKHR = 4422,
|
CapabilityFragmentShadingRateKHR = 4422,
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
CapabilitySubgroupBallotKHR = 4423,
|
||||||
CapabilityDrawParameters = 4427,
|
CapabilityDrawParameters = 4427,
|
||||||
|
|
@ -1302,6 +1303,8 @@ enum CooperativeMatrixOperandsMask {
|
||||||
enum CooperativeMatrixLayout {
|
enum CooperativeMatrixLayout {
|
||||||
CooperativeMatrixLayoutRowMajorKHR = 0,
|
CooperativeMatrixLayoutRowMajorKHR = 0,
|
||||||
CooperativeMatrixLayoutColumnMajorKHR = 1,
|
CooperativeMatrixLayoutColumnMajorKHR = 1,
|
||||||
|
CooperativeMatrixLayoutRowBlockedInterleavedARM = 4202,
|
||||||
|
CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203,
|
||||||
CooperativeMatrixLayoutMax = 0x7fffffff,
|
CooperativeMatrixLayoutMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1668,6 +1671,7 @@ enum Op {
|
||||||
OpSubgroupAllEqualKHR = 4430,
|
OpSubgroupAllEqualKHR = 4430,
|
||||||
OpGroupNonUniformRotateKHR = 4431,
|
OpGroupNonUniformRotateKHR = 4431,
|
||||||
OpSubgroupReadInvocationKHR = 4432,
|
OpSubgroupReadInvocationKHR = 4432,
|
||||||
|
OpExtInstWithForwardRefsKHR = 4433,
|
||||||
OpTraceRayKHR = 4445,
|
OpTraceRayKHR = 4445,
|
||||||
OpExecuteCallableKHR = 4446,
|
OpExecuteCallableKHR = 4446,
|
||||||
OpConvertUToAccelerationStructureKHR = 4447,
|
OpConvertUToAccelerationStructureKHR = 4447,
|
||||||
|
|
@ -2395,6 +2399,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
spv.16bitstorage-int.frag
|
spv.16bitstorage-int.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 171
|
// Id's are bound by 187
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Int16
|
||||||
Capability StorageUniformBufferBlock16
|
Capability StorageUniformBufferBlock16
|
||||||
Capability StorageUniform16
|
Capability StorageUniform16
|
||||||
Extension "SPV_KHR_16bit_storage"
|
Extension "SPV_KHR_16bit_storage"
|
||||||
|
|
@ -335,5 +336,24 @@ spv.16bitstorage-int.frag
|
||||||
169: 6(int16_t) SConvert 58
|
169: 6(int16_t) SConvert 58
|
||||||
170: 28(ptr) AccessChain 19(b2) 21
|
170: 28(ptr) AccessChain 19(b2) 21
|
||||||
Store 170 169
|
Store 170 169
|
||||||
|
171: 28(ptr) AccessChain 27(b1) 21
|
||||||
|
172: 6(int16_t) Load 171
|
||||||
|
173: 28(ptr) AccessChain 19(b2) 21
|
||||||
|
Store 173 172
|
||||||
|
174: 42(ptr) AccessChain 27(b1) 32
|
||||||
|
175: 7(i16vec2) Load 174
|
||||||
|
176: 6(int16_t) CompositeExtract 175 0
|
||||||
|
177: 6(int16_t) CompositeExtract 175 1
|
||||||
|
178: 7(i16vec2) CompositeConstruct 176 177
|
||||||
|
179: 42(ptr) AccessChain 19(b2) 32
|
||||||
|
Store 179 178
|
||||||
|
180: 34(ptr) AccessChain 27(b1) 33
|
||||||
|
181: 8(i16vec3) Load 180
|
||||||
|
182: 6(int16_t) CompositeExtract 181 0
|
||||||
|
183: 6(int16_t) CompositeExtract 181 1
|
||||||
|
184: 6(int16_t) CompositeExtract 181 2
|
||||||
|
185: 8(i16vec3) CompositeConstruct 182 183 184
|
||||||
|
186: 34(ptr) AccessChain 19(b2) 33
|
||||||
|
Store 186 185
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
spv.16bitstorage-uint.frag
|
spv.16bitstorage-uint.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 173
|
// Id's are bound by 189
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Int16
|
||||||
Capability StorageUniformBufferBlock16
|
Capability StorageUniformBufferBlock16
|
||||||
Capability StorageUniform16
|
Capability StorageUniform16
|
||||||
Extension "SPV_KHR_16bit_storage"
|
Extension "SPV_KHR_16bit_storage"
|
||||||
|
|
@ -337,5 +338,24 @@ spv.16bitstorage-uint.frag
|
||||||
171: 6(int16_t) UConvert 170
|
171: 6(int16_t) UConvert 170
|
||||||
172: 28(ptr) AccessChain 19(b2) 21
|
172: 28(ptr) AccessChain 19(b2) 21
|
||||||
Store 172 171
|
Store 172 171
|
||||||
|
173: 28(ptr) AccessChain 27(b1) 21
|
||||||
|
174: 6(int16_t) Load 173
|
||||||
|
175: 28(ptr) AccessChain 19(b2) 21
|
||||||
|
Store 175 174
|
||||||
|
176: 42(ptr) AccessChain 27(b1) 32
|
||||||
|
177: 7(i16vec2) Load 176
|
||||||
|
178: 6(int16_t) CompositeExtract 177 0
|
||||||
|
179: 6(int16_t) CompositeExtract 177 1
|
||||||
|
180: 7(i16vec2) CompositeConstruct 178 179
|
||||||
|
181: 42(ptr) AccessChain 19(b2) 32
|
||||||
|
Store 181 180
|
||||||
|
182: 34(ptr) AccessChain 27(b1) 33
|
||||||
|
183: 8(i16vec3) Load 182
|
||||||
|
184: 6(int16_t) CompositeExtract 183 0
|
||||||
|
185: 6(int16_t) CompositeExtract 183 1
|
||||||
|
186: 6(int16_t) CompositeExtract 183 2
|
||||||
|
187: 8(i16vec3) CompositeConstruct 184 185 186
|
||||||
|
188: 34(ptr) AccessChain 19(b2) 33
|
||||||
|
Store 188 187
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
spv.16bitstorage.frag
|
spv.16bitstorage.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 173
|
// Id's are bound by 189
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
Capability StorageUniformBufferBlock16
|
Capability StorageUniformBufferBlock16
|
||||||
Capability StorageUniform16
|
Capability StorageUniform16
|
||||||
Extension "SPV_KHR_16bit_storage"
|
Extension "SPV_KHR_16bit_storage"
|
||||||
|
|
@ -337,5 +338,24 @@ spv.16bitstorage.frag
|
||||||
171:6(float16_t) FConvert 170
|
171:6(float16_t) FConvert 170
|
||||||
172: 28(ptr) AccessChain 19(b2) 21
|
172: 28(ptr) AccessChain 19(b2) 21
|
||||||
Store 172 171
|
Store 172 171
|
||||||
|
173: 28(ptr) AccessChain 27(b1) 21
|
||||||
|
174:6(float16_t) Load 173
|
||||||
|
175: 28(ptr) AccessChain 19(b2) 21
|
||||||
|
Store 175 174
|
||||||
|
176: 43(ptr) AccessChain 27(b1) 32
|
||||||
|
177: 7(f16vec2) Load 176
|
||||||
|
178:6(float16_t) CompositeExtract 177 0
|
||||||
|
179:6(float16_t) CompositeExtract 177 1
|
||||||
|
180: 7(f16vec2) CompositeConstruct 178 179
|
||||||
|
181: 43(ptr) AccessChain 19(b2) 32
|
||||||
|
Store 181 180
|
||||||
|
182: 34(ptr) AccessChain 27(b1) 33
|
||||||
|
183: 8(f16vec3) Load 182
|
||||||
|
184:6(float16_t) CompositeExtract 183 0
|
||||||
|
185:6(float16_t) CompositeExtract 183 1
|
||||||
|
186:6(float16_t) CompositeExtract 183 2
|
||||||
|
187: 8(f16vec3) CompositeConstruct 184 185 186
|
||||||
|
188: 34(ptr) AccessChain 19(b2) 33
|
||||||
|
Store 188 187
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
spv.8bitstorage-int.frag
|
spv.8bitstorage-int.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 171
|
// Id's are bound by 187
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Int8
|
||||||
Capability UniformAndStorageBuffer8BitAccess
|
Capability UniformAndStorageBuffer8BitAccess
|
||||||
Extension "SPV_KHR_8bit_storage"
|
Extension "SPV_KHR_8bit_storage"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
|
@ -334,5 +335,24 @@ spv.8bitstorage-int.frag
|
||||||
169: 6(int8_t) SConvert 58
|
169: 6(int8_t) SConvert 58
|
||||||
170: 28(ptr) AccessChain 19(b2) 21
|
170: 28(ptr) AccessChain 19(b2) 21
|
||||||
Store 170 169
|
Store 170 169
|
||||||
|
171: 28(ptr) AccessChain 27(b1) 21
|
||||||
|
172: 6(int8_t) Load 171
|
||||||
|
173: 28(ptr) AccessChain 19(b2) 21
|
||||||
|
Store 173 172
|
||||||
|
174: 42(ptr) AccessChain 27(b1) 32
|
||||||
|
175: 7(i8vec2) Load 174
|
||||||
|
176: 6(int8_t) CompositeExtract 175 0
|
||||||
|
177: 6(int8_t) CompositeExtract 175 1
|
||||||
|
178: 7(i8vec2) CompositeConstruct 176 177
|
||||||
|
179: 42(ptr) AccessChain 19(b2) 32
|
||||||
|
Store 179 178
|
||||||
|
180: 34(ptr) AccessChain 27(b1) 33
|
||||||
|
181: 8(i8vec3) Load 180
|
||||||
|
182: 6(int8_t) CompositeExtract 181 0
|
||||||
|
183: 6(int8_t) CompositeExtract 181 1
|
||||||
|
184: 6(int8_t) CompositeExtract 181 2
|
||||||
|
185: 8(i8vec3) CompositeConstruct 182 183 184
|
||||||
|
186: 34(ptr) AccessChain 19(b2) 33
|
||||||
|
Store 186 185
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
spv.8bitstorage-uint.frag
|
spv.8bitstorage-uint.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 173
|
// Id's are bound by 189
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Int8
|
||||||
Capability UniformAndStorageBuffer8BitAccess
|
Capability UniformAndStorageBuffer8BitAccess
|
||||||
Extension "SPV_KHR_8bit_storage"
|
Extension "SPV_KHR_8bit_storage"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
|
@ -336,5 +337,24 @@ spv.8bitstorage-uint.frag
|
||||||
171: 6(int8_t) UConvert 170
|
171: 6(int8_t) UConvert 170
|
||||||
172: 28(ptr) AccessChain 19(b2) 21
|
172: 28(ptr) AccessChain 19(b2) 21
|
||||||
Store 172 171
|
Store 172 171
|
||||||
|
173: 28(ptr) AccessChain 27(b1) 21
|
||||||
|
174: 6(int8_t) Load 173
|
||||||
|
175: 28(ptr) AccessChain 19(b2) 21
|
||||||
|
Store 175 174
|
||||||
|
176: 42(ptr) AccessChain 27(b1) 32
|
||||||
|
177: 7(i8vec2) Load 176
|
||||||
|
178: 6(int8_t) CompositeExtract 177 0
|
||||||
|
179: 6(int8_t) CompositeExtract 177 1
|
||||||
|
180: 7(i8vec2) CompositeConstruct 178 179
|
||||||
|
181: 42(ptr) AccessChain 19(b2) 32
|
||||||
|
Store 181 180
|
||||||
|
182: 34(ptr) AccessChain 27(b1) 33
|
||||||
|
183: 8(i8vec3) Load 182
|
||||||
|
184: 6(int8_t) CompositeExtract 183 0
|
||||||
|
185: 6(int8_t) CompositeExtract 183 1
|
||||||
|
186: 6(int8_t) CompositeExtract 183 2
|
||||||
|
187: 8(i8vec3) CompositeConstruct 184 185 186
|
||||||
|
188: 34(ptr) AccessChain 19(b2) 33
|
||||||
|
Store 188 187
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
405
Test/baseResults/spv.coopmat_armlayout.comp.out
Normal file
405
Test/baseResults/spv.coopmat_armlayout.comp.out
Normal file
|
|
@ -0,0 +1,405 @@
|
||||||
|
spv.coopmat_armlayout.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 251
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
|
Capability Int16
|
||||||
|
Capability Int8
|
||||||
|
Capability CooperativeMatrixLayoutsARM
|
||||||
|
Capability StorageUniformBufferBlock16
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability PhysicalStorageBufferAddressesEXT
|
||||||
|
Capability CooperativeMatrixKHR
|
||||||
|
Extension "SPV_ARM_cooperative_matrix_layouts"
|
||||||
|
Extension "SPV_KHR_16bit_storage"
|
||||||
|
Extension "SPV_KHR_cooperative_matrix"
|
||||||
|
Extension "SPV_KHR_physical_storage_buffer"
|
||||||
|
Extension "SPV_KHR_storage_buffer_storage_class"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel PhysicalStorageBuffer64EXT VulkanKHR
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 64 1 1
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_buffer_reference"
|
||||||
|
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
|
||||||
|
SourceExtension "GL_KHR_cooperative_matrix"
|
||||||
|
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 15 "f16(f161;"
|
||||||
|
Name 14 "m"
|
||||||
|
Name 22 "f32(f1;"
|
||||||
|
Name 21 "m"
|
||||||
|
Name 35 "m"
|
||||||
|
Name 53 "m2"
|
||||||
|
Name 57 "x"
|
||||||
|
Name 65 "tempArg"
|
||||||
|
Name 69 "Block"
|
||||||
|
MemberName 69(Block) 0 "y"
|
||||||
|
MemberName 69(Block) 1 "x"
|
||||||
|
Name 71 "block"
|
||||||
|
Name 81 "tempArg"
|
||||||
|
Name 86 "Block16"
|
||||||
|
MemberName 86(Block16) 0 "y"
|
||||||
|
MemberName 86(Block16) 1 "x"
|
||||||
|
MemberName 86(Block16) 2 "b"
|
||||||
|
Name 89 "Block"
|
||||||
|
MemberName 89(Block) 0 "y"
|
||||||
|
MemberName 89(Block) 1 "x"
|
||||||
|
Name 91 "block16"
|
||||||
|
Name 98 "tempArg"
|
||||||
|
Name 111 "D"
|
||||||
|
Name 115 "A"
|
||||||
|
Name 119 "B"
|
||||||
|
Name 121 "C"
|
||||||
|
Name 125 "l"
|
||||||
|
Name 129 "Y"
|
||||||
|
Name 130 "Z"
|
||||||
|
Name 133 "F"
|
||||||
|
Name 138 "a"
|
||||||
|
Name 142 "md1"
|
||||||
|
Name 153 "mC2"
|
||||||
|
Name 158 "tempArg"
|
||||||
|
Name 164 "tempArg"
|
||||||
|
Name 170 "p1"
|
||||||
|
Name 171 "param"
|
||||||
|
Name 174 "p2"
|
||||||
|
Name 175 "param"
|
||||||
|
Name 189 "tempArg"
|
||||||
|
Name 194 "shmatrix"
|
||||||
|
Name 198 "ms"
|
||||||
|
Name 205 "ms8A"
|
||||||
|
Name 209 "ms8B"
|
||||||
|
Name 213 "ms8C"
|
||||||
|
Name 228 "m16"
|
||||||
|
Name 234 "mC"
|
||||||
|
Name 235 "F"
|
||||||
|
Name 240 "S"
|
||||||
|
MemberName 240(S) 0 "a"
|
||||||
|
MemberName 240(S) 1 "b"
|
||||||
|
MemberName 240(S) 2 "c"
|
||||||
|
Name 245 "SC"
|
||||||
|
Name 250 "scm"
|
||||||
|
Decorate 67 ArrayStride 4
|
||||||
|
Decorate 68 ArrayStride 4
|
||||||
|
MemberDecorate 69(Block) 0 Offset 0
|
||||||
|
MemberDecorate 69(Block) 1 Offset 4194304
|
||||||
|
Decorate 69(Block) Block
|
||||||
|
Decorate 71(block) DescriptorSet 0
|
||||||
|
Decorate 71(block) Binding 0
|
||||||
|
Decorate 82 ArrayStride 2
|
||||||
|
Decorate 84 ArrayStride 2
|
||||||
|
MemberDecorate 86(Block16) 0 Offset 0
|
||||||
|
MemberDecorate 86(Block16) 1 Offset 2097152
|
||||||
|
MemberDecorate 86(Block16) 2 Offset 2097160
|
||||||
|
Decorate 86(Block16) Block
|
||||||
|
Decorate 87 ArrayStride 4
|
||||||
|
Decorate 88 ArrayStride 4
|
||||||
|
MemberDecorate 89(Block) 0 Offset 0
|
||||||
|
MemberDecorate 89(Block) 1 Offset 4194304
|
||||||
|
Decorate 89(Block) Block
|
||||||
|
Decorate 91(block16) DescriptorSet 0
|
||||||
|
Decorate 91(block16) Binding 0
|
||||||
|
Decorate 129(Y) SpecId 0
|
||||||
|
Decorate 233 BuiltIn WorkgroupSize
|
||||||
|
Decorate 235(F) SpecId 1
|
||||||
|
Decorate 245(SC) SpecId 2
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 16
|
||||||
|
7: TypeInt 32 0
|
||||||
|
8: 7(int) Constant 3
|
||||||
|
9: 7(int) Constant 8
|
||||||
|
10: 7(int) Constant 2
|
||||||
|
11: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 10
|
||||||
|
12: TypePointer Function 11
|
||||||
|
13: TypeFunction 11 12(ptr)
|
||||||
|
17: TypeFloat 32
|
||||||
|
18: TypeCooperativeMatrixKHR 17(float) 8 9 9 10
|
||||||
|
19: TypePointer Function 18
|
||||||
|
20: TypeFunction 18 19(ptr)
|
||||||
|
32: 7(int) Constant 16
|
||||||
|
33: TypeCooperativeMatrixKHR 17(float) 8 32 9 10
|
||||||
|
34: TypePointer Function 33
|
||||||
|
36: 17(float) Constant 0
|
||||||
|
37: 33 ConstantComposite 36
|
||||||
|
46: 17(float) Constant 1073741824
|
||||||
|
51: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 10
|
||||||
|
52: TypePointer Function 51
|
||||||
|
56: TypePointer Function 17(float)
|
||||||
|
58: TypeInt 32 1
|
||||||
|
59: 58(int) Constant 1
|
||||||
|
62: 58(int) Constant 0
|
||||||
|
66: 7(int) Constant 1048576
|
||||||
|
67: TypeArray 17(float) 66
|
||||||
|
68: TypeRuntimeArray 17(float)
|
||||||
|
69(Block): TypeStruct 67 68
|
||||||
|
70: TypePointer StorageBuffer 69(Block)
|
||||||
|
71(block): 70(ptr) Variable StorageBuffer
|
||||||
|
72: 7(int) Constant 5
|
||||||
|
73: TypePointer StorageBuffer 17(float)
|
||||||
|
75: 7(int) Constant 128
|
||||||
|
76: 58(int) Constant 4202
|
||||||
|
82: TypeArray 6(float16_t) 66
|
||||||
|
83: 7(int) Constant 1
|
||||||
|
84: TypeArray 6(float16_t) 83
|
||||||
|
TypeForwardPointer 85 PhysicalStorageBufferEXT
|
||||||
|
86(Block16): TypeStruct 82 84 85
|
||||||
|
87: TypeArray 17(float) 66
|
||||||
|
88: TypeRuntimeArray 17(float)
|
||||||
|
89(Block): TypeStruct 87 88
|
||||||
|
85: TypePointer PhysicalStorageBufferEXT 89(Block)
|
||||||
|
90: TypePointer StorageBuffer 86(Block16)
|
||||||
|
91(block16): 90(ptr) Variable StorageBuffer
|
||||||
|
92: TypePointer StorageBuffer 6(float16_t)
|
||||||
|
99: 58(int) Constant 2
|
||||||
|
100: TypePointer StorageBuffer 85(ptr)
|
||||||
|
103: TypePointer PhysicalStorageBufferEXT 17(float)
|
||||||
|
112: 7(int) Constant 0
|
||||||
|
113: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 112
|
||||||
|
114: TypePointer Function 113
|
||||||
|
117: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 83
|
||||||
|
118: TypePointer Function 117
|
||||||
|
124: TypePointer Function 58(int)
|
||||||
|
128: 58(int) Constant 8
|
||||||
|
129(Y): 58(int) SpecConstant 2
|
||||||
|
130(Z): 58(int) SpecConstantOp 132 128 129(Y)
|
||||||
|
131: TypeCooperativeMatrixKHR 6(float16_t) 8 130(Z) 130(Z) 10
|
||||||
|
132: TypePointer Function 131
|
||||||
|
134:6(float16_t) Constant 0
|
||||||
|
135: 131 ConstantComposite 134
|
||||||
|
136: TypeArray 33 72
|
||||||
|
137: TypePointer Function 136
|
||||||
|
139: 58(int) Constant 3
|
||||||
|
140: 17(float) Constant 1065353216
|
||||||
|
146: 58(int) Constant 1234
|
||||||
|
150: TypeCooperativeMatrixKHR 6(float16_t) 8 130(Z) 9 10
|
||||||
|
151: TypeArray 150 8
|
||||||
|
152: TypePointer Private 151
|
||||||
|
153(mC2): 152(ptr) Variable Private
|
||||||
|
154: TypePointer Private 150
|
||||||
|
178: 11 ConstantComposite 134
|
||||||
|
179: 18 ConstantComposite 36
|
||||||
|
183:6(float16_t) Constant 16384
|
||||||
|
186: 17(float) Constant 1082130432
|
||||||
|
190: TypeVector 7(int) 4
|
||||||
|
191: 7(int) Constant 32
|
||||||
|
192: TypeArray 190(ivec4) 191
|
||||||
|
193: TypePointer Workgroup 192
|
||||||
|
194(shmatrix): 193(ptr) Variable Workgroup
|
||||||
|
195: TypePointer Workgroup 190(ivec4)
|
||||||
|
202: TypeInt 8 1
|
||||||
|
203: TypeCooperativeMatrixKHR 202(int8_t) 8 9 9 112
|
||||||
|
204: TypePointer Function 203
|
||||||
|
207: TypeCooperativeMatrixKHR 202(int8_t) 8 9 9 83
|
||||||
|
208: TypePointer Function 207
|
||||||
|
211: TypeCooperativeMatrixKHR 202(int8_t) 8 9 9 10
|
||||||
|
212: TypePointer Function 211
|
||||||
|
223: 58(int) Constant 16
|
||||||
|
225: TypeInt 16 1
|
||||||
|
226: TypeCooperativeMatrixKHR 225(int16_t) 8 9 9 112
|
||||||
|
227: TypePointer Function 226
|
||||||
|
231: TypeVector 7(int) 3
|
||||||
|
232: 7(int) Constant 64
|
||||||
|
233: 231(ivec3) ConstantComposite 232 83 83
|
||||||
|
234(mC): 154(ptr) Variable Private
|
||||||
|
235(F): 17(float) SpecConstant 1077936128
|
||||||
|
236: TypeCooperativeMatrixKHR 17(float) 8 130(Z) 9 10
|
||||||
|
237: 236 ConstantComposite 36
|
||||||
|
238:6(float16_t) Constant 15360
|
||||||
|
239: 11 ConstantComposite 238
|
||||||
|
240(S): TypeStruct 58(int) 58(int) 58(int)
|
||||||
|
241: 58(int) Constant 12
|
||||||
|
242: 58(int) Constant 23
|
||||||
|
243: 58(int) Constant 34
|
||||||
|
244: 240(S) ConstantComposite 241 242 243
|
||||||
|
245(SC): 58(int) SpecConstant 1
|
||||||
|
246: TypeCooperativeMatrixKHR 6(float16_t) 8 245(SC) 245(SC) 10
|
||||||
|
247: TypeArray 246 245(SC)
|
||||||
|
248: TypeArray 247 245(SC)
|
||||||
|
249: TypePointer Private 248
|
||||||
|
250(scm): 249(ptr) Variable Private
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
35(m): 34(ptr) Variable Function
|
||||||
|
53(m2): 52(ptr) Variable Function
|
||||||
|
57(x): 56(ptr) Variable Function
|
||||||
|
65(tempArg): 34(ptr) Variable Function
|
||||||
|
81(tempArg): 52(ptr) Variable Function
|
||||||
|
98(tempArg): 34(ptr) Variable Function
|
||||||
|
111(D): 34(ptr) Variable Function
|
||||||
|
115(A): 114(ptr) Variable Function
|
||||||
|
119(B): 118(ptr) Variable Function
|
||||||
|
121(C): 34(ptr) Variable Function
|
||||||
|
125(l): 124(ptr) Variable Function
|
||||||
|
133(F): 132(ptr) Variable Function
|
||||||
|
138(a): 137(ptr) Variable Function
|
||||||
|
142(md1): 56(ptr) Variable Function
|
||||||
|
158(tempArg): 34(ptr) Variable Function
|
||||||
|
164(tempArg): 52(ptr) Variable Function
|
||||||
|
170(p1): 12(ptr) Variable Function
|
||||||
|
171(param): 12(ptr) Variable Function
|
||||||
|
174(p2): 19(ptr) Variable Function
|
||||||
|
175(param): 19(ptr) Variable Function
|
||||||
|
189(tempArg): 52(ptr) Variable Function
|
||||||
|
198(ms): 52(ptr) Variable Function
|
||||||
|
205(ms8A): 204(ptr) Variable Function
|
||||||
|
209(ms8B): 208(ptr) Variable Function
|
||||||
|
213(ms8C): 212(ptr) Variable Function
|
||||||
|
228(m16): 227(ptr) Variable Function
|
||||||
|
Store 35(m) 37
|
||||||
|
38: 33 Load 35(m)
|
||||||
|
39: 33 Load 35(m)
|
||||||
|
40: 33 FAdd 38 39
|
||||||
|
Store 35(m) 40
|
||||||
|
41: 33 Load 35(m)
|
||||||
|
42: 33 Load 35(m)
|
||||||
|
43: 33 FSub 41 42
|
||||||
|
Store 35(m) 43
|
||||||
|
44: 33 Load 35(m)
|
||||||
|
45: 33 FNegate 44
|
||||||
|
Store 35(m) 45
|
||||||
|
47: 33 Load 35(m)
|
||||||
|
48: 33 MatrixTimesScalar 47 46
|
||||||
|
Store 35(m) 48
|
||||||
|
49: 33 Load 35(m)
|
||||||
|
50: 33 MatrixTimesScalar 49 46
|
||||||
|
Store 35(m) 50
|
||||||
|
54: 33 Load 35(m)
|
||||||
|
55: 51 FConvert 54
|
||||||
|
Store 53(m2) 55
|
||||||
|
60: 56(ptr) AccessChain 35(m) 59
|
||||||
|
61: 17(float) Load 60
|
||||||
|
Store 57(x) 61
|
||||||
|
63: 17(float) Load 57(x)
|
||||||
|
64: 56(ptr) AccessChain 35(m) 62
|
||||||
|
Store 64 63
|
||||||
|
74: 73(ptr) AccessChain 71(block) 59 32
|
||||||
|
77: 33 CooperativeMatrixLoadKHR 74 76 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 65(tempArg) 77
|
||||||
|
78: 33 Load 65(tempArg)
|
||||||
|
Store 35(m) 78
|
||||||
|
79: 33 Load 35(m)
|
||||||
|
80: 73(ptr) AccessChain 71(block) 59 32
|
||||||
|
CooperativeMatrixStoreKHR 80 79 76 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
93: 92(ptr) AccessChain 91(block16) 59 32
|
||||||
|
94: 51 CooperativeMatrixLoadKHR 93 76 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 81(tempArg) 94
|
||||||
|
95: 51 Load 81(tempArg)
|
||||||
|
Store 53(m2) 95
|
||||||
|
96: 51 Load 53(m2)
|
||||||
|
97: 92(ptr) AccessChain 91(block16) 59 32
|
||||||
|
CooperativeMatrixStoreKHR 97 96 76 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
101: 100(ptr) AccessChain 91(block16) 99
|
||||||
|
102: 85(ptr) Load 101 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
104: 103(ptr) AccessChain 102 59 32
|
||||||
|
105: 33 CooperativeMatrixLoadKHR 104 76 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 72
|
||||||
|
Store 98(tempArg) 105
|
||||||
|
106: 33 Load 98(tempArg)
|
||||||
|
Store 35(m) 106
|
||||||
|
107: 33 Load 35(m)
|
||||||
|
108: 100(ptr) AccessChain 91(block16) 99
|
||||||
|
109: 85(ptr) Load 108 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
110: 103(ptr) AccessChain 109 59 32
|
||||||
|
CooperativeMatrixStoreKHR 110 107 76 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 72
|
||||||
|
116: 113 Load 115(A)
|
||||||
|
120: 117 Load 119(B)
|
||||||
|
122: 33 Load 121(C)
|
||||||
|
123: 33 CooperativeMatrixMulAddKHR 116 120 122
|
||||||
|
Store 111(D) 123
|
||||||
|
126: 7(int) CooperativeMatrixLengthKHR 33
|
||||||
|
127: 58(int) Bitcast 126
|
||||||
|
Store 125(l) 127
|
||||||
|
Store 133(F) 135
|
||||||
|
141: 56(ptr) AccessChain 138(a) 139 62
|
||||||
|
Store 141 140
|
||||||
|
Store 142(md1) 36
|
||||||
|
143: 33 Load 35(m)
|
||||||
|
144: 33 Load 35(m)
|
||||||
|
145: 33 FAdd 144 143
|
||||||
|
Store 35(m) 145
|
||||||
|
147: 17(float) CompositeExtract 145 1234
|
||||||
|
148: 17(float) Load 142(md1)
|
||||||
|
149: 17(float) FAdd 148 147
|
||||||
|
Store 142(md1) 149
|
||||||
|
155: 154(ptr) AccessChain 153(mC2) 99
|
||||||
|
156: 150 Load 155
|
||||||
|
157: 154(ptr) AccessChain 153(mC2) 59
|
||||||
|
Store 157 156
|
||||||
|
159: 73(ptr) AccessChain 71(block) 62 32
|
||||||
|
160: 33 CooperativeMatrixLoadKHR 159 76 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 158(tempArg) 160
|
||||||
|
161: 33 Load 158(tempArg)
|
||||||
|
Store 35(m) 161
|
||||||
|
162: 33 Load 35(m)
|
||||||
|
163: 73(ptr) AccessChain 71(block) 62 32
|
||||||
|
CooperativeMatrixStoreKHR 163 162 76 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
165: 92(ptr) AccessChain 91(block16) 62 32
|
||||||
|
166: 51 CooperativeMatrixLoadKHR 165 76 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 164(tempArg) 166
|
||||||
|
167: 51 Load 164(tempArg)
|
||||||
|
Store 53(m2) 167
|
||||||
|
168: 51 Load 53(m2)
|
||||||
|
169: 92(ptr) AccessChain 91(block16) 62 32
|
||||||
|
CooperativeMatrixStoreKHR 169 168 76 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
172: 11 Load 170(p1)
|
||||||
|
Store 171(param) 172
|
||||||
|
173: 11 FunctionCall 15(f16(f161;) 171(param)
|
||||||
|
Store 170(p1) 173
|
||||||
|
176: 18 Load 174(p2)
|
||||||
|
Store 175(param) 176
|
||||||
|
177: 18 FunctionCall 22(f32(f1;) 175(param)
|
||||||
|
Store 174(p2) 177
|
||||||
|
Store 170(p1) 178
|
||||||
|
Store 174(p2) 179
|
||||||
|
180: 11 Load 170(p1)
|
||||||
|
181: 11 Load 170(p1)
|
||||||
|
182: 11 FDiv 181 180
|
||||||
|
Store 170(p1) 182
|
||||||
|
184: 11 Load 170(p1)
|
||||||
|
185: 11 MatrixTimesScalar 184 183
|
||||||
|
Store 170(p1) 185
|
||||||
|
187: 18 Load 174(p2)
|
||||||
|
188: 18 MatrixTimesScalar 187 186
|
||||||
|
Store 174(p2) 188
|
||||||
|
196: 195(ptr) AccessChain 194(shmatrix) 83
|
||||||
|
197: 51 CooperativeMatrixLoadKHR 196 76 10 MakePointerVisibleKHR NonPrivatePointerKHR 10
|
||||||
|
Store 189(tempArg) 197
|
||||||
|
199: 51 Load 189(tempArg)
|
||||||
|
Store 198(ms) 199
|
||||||
|
200: 51 Load 198(ms)
|
||||||
|
201: 195(ptr) AccessChain 194(shmatrix) 83
|
||||||
|
CooperativeMatrixStoreKHR 201 200 76 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
|
||||||
|
206: 203 Load 205(ms8A)
|
||||||
|
210: 207 Load 209(ms8B)
|
||||||
|
214: 211 Load 213(ms8C)
|
||||||
|
215: 211 CooperativeMatrixMulAddKHR 206 210 214 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR
|
||||||
|
216: 203 Load 205(ms8A)
|
||||||
|
217: 207 Load 209(ms8B)
|
||||||
|
218: 211 Load 213(ms8C)
|
||||||
|
219: 211 CooperativeMatrixMulAddKHR 216 217 218 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR
|
||||||
|
220: 203 Load 205(ms8A)
|
||||||
|
221: 207 Load 209(ms8B)
|
||||||
|
222: 211 Load 213(ms8C)
|
||||||
|
224: 211 CooperativeMatrixMulAddKHR 220 221 222 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR SaturatingAccumulationKHR
|
||||||
|
229: 226 Load 228(m16)
|
||||||
|
230: 195(ptr) AccessChain 194(shmatrix) 83
|
||||||
|
CooperativeMatrixStoreKHR 230 229 76 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
15(f16(f161;): 11 Function None 13
|
||||||
|
14(m): 12(ptr) FunctionParameter
|
||||||
|
16: Label
|
||||||
|
24: 11 Load 14(m)
|
||||||
|
25: 11 FNegate 24
|
||||||
|
ReturnValue 25
|
||||||
|
FunctionEnd
|
||||||
|
22(f32(f1;): 18 Function None 20
|
||||||
|
21(m): 19(ptr) FunctionParameter
|
||||||
|
23: Label
|
||||||
|
28: 18 Load 21(m)
|
||||||
|
29: 18 FNegate 28
|
||||||
|
ReturnValue 29
|
||||||
|
FunctionEnd
|
||||||
|
|
@ -1,17 +1,18 @@
|
||||||
spv.debuginfo.bufferref.glsl.frag
|
spv.debuginfo.bufferref.glsl.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 142
|
// Id's are bound by 146
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability PhysicalStorageBufferAddressesEXT
|
Capability PhysicalStorageBufferAddressesEXT
|
||||||
Extension "SPV_KHR_non_semantic_info"
|
Extension "SPV_KHR_non_semantic_info"
|
||||||
Extension "SPV_KHR_physical_storage_buffer"
|
Extension "SPV_KHR_physical_storage_buffer"
|
||||||
|
Extension "SPV_KHR_relaxed_extended_instruction"
|
||||||
Extension "SPV_KHR_storage_buffer_storage_class"
|
Extension "SPV_KHR_storage_buffer_storage_class"
|
||||||
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
|
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
|
||||||
3: ExtInstImport "GLSL.std.450"
|
3: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel PhysicalStorageBuffer64EXT GLSL450
|
MemoryModel PhysicalStorageBuffer64EXT GLSL450
|
||||||
EntryPoint Fragment 14 "main" 76 131
|
EntryPoint Fragment 14 "main" 82 135
|
||||||
ExecutionMode 14 OriginUpperLeft
|
ExecutionMode 14 OriginUpperLeft
|
||||||
2: String "spv.debuginfo.bufferref.glsl.frag"
|
2: String "spv.debuginfo.bufferref.glsl.frag"
|
||||||
8: String "uint"
|
8: String "uint"
|
||||||
|
|
@ -52,46 +53,47 @@ void main() {
|
||||||
out_fragColor = vec4(vertex_pos0, 1.0);
|
out_fragColor = vec4(vertex_pos0, 1.0);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
31: String "Mesh"
|
33: String "positions"
|
||||||
34: String "float"
|
37: String "Mesh"
|
||||||
40: String "data"
|
40: String "float"
|
||||||
44: String "MeshVertexPositions"
|
46: String "data"
|
||||||
50: String "meshData"
|
49: String "MeshVertexPositions"
|
||||||
63: String "PerPass_meshes"
|
55: String "meshData"
|
||||||
69: String "perPass_meshes"
|
69: String "PerPass_meshes"
|
||||||
71: String "int"
|
75: String "perPass_meshes"
|
||||||
78: String "tri_idx0"
|
77: String "int"
|
||||||
94: String "vertex_pos0"
|
84: String "tri_idx0"
|
||||||
133: String "out_fragColor"
|
100: String "vertex_pos0"
|
||||||
|
137: String "out_fragColor"
|
||||||
SourceExtension "GL_EXT_buffer_reference"
|
SourceExtension "GL_EXT_buffer_reference"
|
||||||
Name 14 "main"
|
Name 14 "main"
|
||||||
Name 29 "Mesh"
|
Name 31 "Mesh"
|
||||||
MemberName 29(Mesh) 0 "positions"
|
MemberName 31(Mesh) 0 "positions"
|
||||||
Name 38 "MeshVertexPositions"
|
Name 44 "MeshVertexPositions"
|
||||||
MemberName 38(MeshVertexPositions) 0 "data"
|
MemberName 44(MeshVertexPositions) 0 "data"
|
||||||
Name 48 "meshData"
|
Name 53 "meshData"
|
||||||
Name 54 "Mesh"
|
Name 59 "Mesh"
|
||||||
MemberName 54(Mesh) 0 "positions"
|
MemberName 59(Mesh) 0 "positions"
|
||||||
Name 58 "PerPass_meshes"
|
Name 64 "PerPass_meshes"
|
||||||
MemberName 58(PerPass_meshes) 0 "data"
|
MemberName 64(PerPass_meshes) 0 "data"
|
||||||
Name 67 "perPass_meshes"
|
Name 73 "perPass_meshes"
|
||||||
Name 76 "tri_idx0"
|
Name 82 "tri_idx0"
|
||||||
Name 92 "vertex_pos0"
|
Name 98 "vertex_pos0"
|
||||||
Name 131 "out_fragColor"
|
Name 135 "out_fragColor"
|
||||||
Decorate 36 ArrayStride 4
|
Decorate 42 ArrayStride 4
|
||||||
MemberDecorate 38(MeshVertexPositions) 0 Offset 0
|
MemberDecorate 44(MeshVertexPositions) 0 Offset 0
|
||||||
Decorate 38(MeshVertexPositions) Block
|
Decorate 44(MeshVertexPositions) Block
|
||||||
MemberDecorate 54(Mesh) 0 Offset 0
|
MemberDecorate 59(Mesh) 0 Offset 0
|
||||||
Decorate 56 ArrayStride 8
|
Decorate 62 ArrayStride 8
|
||||||
MemberDecorate 58(PerPass_meshes) 0 NonWritable
|
MemberDecorate 64(PerPass_meshes) 0 NonWritable
|
||||||
MemberDecorate 58(PerPass_meshes) 0 Offset 0
|
MemberDecorate 64(PerPass_meshes) 0 Offset 0
|
||||||
Decorate 58(PerPass_meshes) Block
|
Decorate 64(PerPass_meshes) Block
|
||||||
Decorate 67(perPass_meshes) DescriptorSet 0
|
Decorate 73(perPass_meshes) DescriptorSet 0
|
||||||
Decorate 67(perPass_meshes) Binding 0
|
Decorate 73(perPass_meshes) Binding 0
|
||||||
Decorate 76(tri_idx0) Flat
|
Decorate 82(tri_idx0) Flat
|
||||||
Decorate 76(tri_idx0) Location 0
|
Decorate 82(tri_idx0) Location 0
|
||||||
Decorate 131(out_fragColor) Location 0
|
Decorate 135(out_fragColor) Location 0
|
||||||
Decorate 48(meshData) DecorationAliasedPointerEXT
|
Decorate 53(meshData) DecorationAliasedPointerEXT
|
||||||
4: TypeVoid
|
4: TypeVoid
|
||||||
5: TypeFunction 4
|
5: TypeFunction 4
|
||||||
7: TypeInt 32 0
|
7: TypeInt 32 0
|
||||||
|
|
@ -109,116 +111,119 @@ void main() {
|
||||||
21: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24
|
21: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24
|
||||||
17: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20
|
17: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20
|
||||||
TypeForwardPointer 28 PhysicalStorageBufferEXT
|
TypeForwardPointer 28 PhysicalStorageBufferEXT
|
||||||
29(Mesh): TypeStruct 28
|
29: 7(int) Constant 5349
|
||||||
32: 7(int) Constant 21
|
30: 4 ExtInstWithForwardRefsKHR 1(NonSemantic.Shader.DebugInfo.100) 3 48 29 12
|
||||||
30: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 22 18 32 12 21 31 12 13
|
31(Mesh): TypeStruct 28
|
||||||
33: TypeFloat 32
|
34: 7(int) Constant 9
|
||||||
35: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 34 10 13 12
|
35: 7(int) Constant 23
|
||||||
36: TypeRuntimeArray 33(float)
|
32: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 33 30 18 34 35 12 12 13
|
||||||
37: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 12
|
38: 7(int) Constant 21
|
||||||
38(MeshVertexPositions): TypeStruct 36
|
36: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 37 22 18 38 12 21 37 12 13 32
|
||||||
41: 7(int) Constant 5
|
39: TypeFloat 32
|
||||||
42: 7(int) Constant 9
|
41: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 40 10 13 12
|
||||||
39: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 37 18 41 42 12 12 13
|
42: TypeRuntimeArray 39(float)
|
||||||
43: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 44 22 18 32 12 21 44 12 13 39
|
43: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 41 12
|
||||||
28: TypePointer PhysicalStorageBufferEXT 38(MeshVertexPositions)
|
44(MeshVertexPositions): TypeStruct 42
|
||||||
45: TypePointer Function 29(Mesh)
|
47: 7(int) Constant 5
|
||||||
46: 7(int) Constant 7
|
45: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 46 43 18 47 34 12 12 13
|
||||||
47: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 46 12
|
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 49 22 18 38 12 21 49 12 13 45
|
||||||
49: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 30 18 32 12 17 23
|
28: TypePointer PhysicalStorageBufferEXT 44(MeshVertexPositions)
|
||||||
52: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
|
50: TypePointer Function 31(Mesh)
|
||||||
54(Mesh): TypeStruct 28(ptr)
|
51: 7(int) Constant 7
|
||||||
55: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 22 18 32 12 21 31 12 13
|
52: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 36 51 12
|
||||||
56: TypeRuntimeArray 54(Mesh)
|
54: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 55 36 18 38 12 17 23
|
||||||
57: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 55 12
|
57: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
|
||||||
58(PerPass_meshes): TypeStruct 56
|
59(Mesh): TypeStruct 28(ptr)
|
||||||
60: 7(int) Constant 13
|
60: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 33 30 18 34 35 12 12 13
|
||||||
61: 7(int) Constant 8
|
61: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 37 22 18 38 12 21 37 12 13 60
|
||||||
59: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 57 18 60 61 12 12 13
|
62: TypeRuntimeArray 59(Mesh)
|
||||||
62: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 63 22 18 32 12 21 63 12 13 59
|
63: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 61 12
|
||||||
64: TypePointer StorageBuffer 58(PerPass_meshes)
|
64(PerPass_meshes): TypeStruct 62
|
||||||
65: 7(int) Constant 12
|
66: 7(int) Constant 13
|
||||||
66: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 62 65 12
|
67: 7(int) Constant 8
|
||||||
67(perPass_meshes): 64(ptr) Variable StorageBuffer
|
65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 46 63 18 66 67 12 12 13
|
||||||
68: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 69 62 18 32 12 21 69 67(perPass_meshes) 61
|
68: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 69 22 18 38 12 21 69 12 13 65
|
||||||
70: TypeInt 32 1
|
70: TypePointer StorageBuffer 64(PerPass_meshes)
|
||||||
72: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 71 10 23 12
|
71: 7(int) Constant 12
|
||||||
73: 70(int) Constant 0
|
72: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 68 71 12
|
||||||
74: TypePointer Input 7(int)
|
73(perPass_meshes): 70(ptr) Variable StorageBuffer
|
||||||
75: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 9 22 12
|
74: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 75 68 18 38 12 21 75 73(perPass_meshes) 67
|
||||||
76(tri_idx0): 74(ptr) Variable Input
|
76: TypeInt 32 1
|
||||||
77: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 78 9 18 32 12 21 78 76(tri_idx0) 61
|
78: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 77 10 23 12
|
||||||
80: TypePointer StorageBuffer 54(Mesh)
|
79: 76(int) Constant 0
|
||||||
81: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 55 65 12
|
80: TypePointer Input 7(int)
|
||||||
85: TypePointer Function 28(ptr)
|
81: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 9 22 12
|
||||||
86: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
|
82(tri_idx0): 80(ptr) Variable Input
|
||||||
88: TypeVector 33(float) 3
|
83: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 84 9 18 38 12 21 84 82(tri_idx0) 67
|
||||||
89: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 13
|
86: TypePointer StorageBuffer 59(Mesh)
|
||||||
90: TypePointer Function 88(fvec3)
|
87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 61 71 12
|
||||||
91: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 89 46 12
|
91: TypePointer Function 28(ptr)
|
||||||
95: 7(int) Constant 23
|
92: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 51 12
|
||||||
93: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 94 89 18 95 12 17 23
|
94: TypeVector 39(float) 3
|
||||||
102: TypePointer PhysicalStorageBufferEXT 33(float)
|
95: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 41 13
|
||||||
103: 7(int) Constant 5349
|
96: TypePointer Function 94(fvec3)
|
||||||
104: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 35 103 12
|
97: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 95 51 12
|
||||||
109: 7(int) Constant 24
|
99: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 100 95 18 35 12 17 23
|
||||||
118: 7(int) Constant 25
|
107: TypePointer PhysicalStorageBufferEXT 39(float)
|
||||||
127: TypeVector 33(float) 4
|
108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 41 29 12
|
||||||
128: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 23
|
113: 7(int) Constant 24
|
||||||
129: TypePointer Output 127(fvec4)
|
122: 7(int) Constant 25
|
||||||
130: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 128 13 12
|
131: TypeVector 39(float) 4
|
||||||
131(out_fragColor): 129(ptr) Variable Output
|
132: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 41 23
|
||||||
134: 7(int) Constant 27
|
133: TypePointer Output 131(fvec4)
|
||||||
132: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 133 128 18 134 12 21 133 131(out_fragColor) 61
|
134: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 132 13 12
|
||||||
137: 33(float) Constant 1065353216
|
135(out_fragColor): 133(ptr) Variable Output
|
||||||
|
138: 7(int) Constant 27
|
||||||
|
136: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 137 132 18 138 12 21 137 135(out_fragColor) 67
|
||||||
|
141: 39(float) Constant 1065353216
|
||||||
14(main): 4 Function None 5
|
14(main): 4 Function None 5
|
||||||
15: Label
|
15: Label
|
||||||
48(meshData): 45(ptr) Variable Function
|
53(meshData): 50(ptr) Variable Function
|
||||||
92(vertex_pos0): 90(ptr) Variable Function
|
98(vertex_pos0): 96(ptr) Variable Function
|
||||||
26: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
|
26: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
|
||||||
27: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 20 20 12 12
|
27: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 20 20 12 12
|
||||||
25: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main)
|
25: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main)
|
||||||
53: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 32 32 12 12
|
58: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 38 38 12 12
|
||||||
51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 48(meshData) 52
|
56: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 54 53(meshData) 57
|
||||||
79: 7(int) Load 76(tri_idx0)
|
85: 7(int) Load 82(tri_idx0)
|
||||||
82: 80(ptr) AccessChain 67(perPass_meshes) 73 79
|
88: 86(ptr) AccessChain 73(perPass_meshes) 79 85
|
||||||
83: 54(Mesh) Load 82
|
89: 59(Mesh) Load 88
|
||||||
84: 28(ptr) CompositeExtract 83 0
|
90: 28(ptr) CompositeExtract 89 0
|
||||||
87: 85(ptr) AccessChain 48(meshData) 73
|
93: 91(ptr) AccessChain 53(meshData) 79
|
||||||
Store 87 84
|
Store 93 90
|
||||||
97: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 95 95 12 12
|
102: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 35 35 12 12
|
||||||
96: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 93 92(vertex_pos0) 52
|
101: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 99 98(vertex_pos0) 57
|
||||||
98: 85(ptr) AccessChain 48(meshData) 73
|
103: 91(ptr) AccessChain 53(meshData) 79
|
||||||
99: 28(ptr) Load 98
|
104: 28(ptr) Load 103
|
||||||
100: 7(int) Load 76(tri_idx0)
|
105: 7(int) Load 82(tri_idx0)
|
||||||
101: 7(int) IMul 13 100
|
106: 7(int) IMul 13 105
|
||||||
105: 102(ptr) AccessChain 99 73 101
|
109: 107(ptr) AccessChain 104 79 106
|
||||||
106: 33(float) Load 105 Aligned 4
|
110: 39(float) Load 109 Aligned 4
|
||||||
108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 109 109 12 12
|
112: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 113 113 12 12
|
||||||
107: 85(ptr) AccessChain 48(meshData) 73
|
111: 91(ptr) AccessChain 53(meshData) 79
|
||||||
110: 28(ptr) Load 107
|
114: 28(ptr) Load 111
|
||||||
111: 7(int) Load 76(tri_idx0)
|
115: 7(int) Load 82(tri_idx0)
|
||||||
112: 7(int) IMul 13 111
|
116: 7(int) IMul 13 115
|
||||||
113: 7(int) IAdd 112 22
|
117: 7(int) IAdd 116 22
|
||||||
114: 102(ptr) AccessChain 110 73 113
|
118: 107(ptr) AccessChain 114 79 117
|
||||||
115: 33(float) Load 114 Aligned 4
|
119: 39(float) Load 118 Aligned 4
|
||||||
117: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 118 118 12 12
|
121: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 122 122 12 12
|
||||||
116: 85(ptr) AccessChain 48(meshData) 73
|
120: 91(ptr) AccessChain 53(meshData) 79
|
||||||
119: 28(ptr) Load 116
|
123: 28(ptr) Load 120
|
||||||
120: 7(int) Load 76(tri_idx0)
|
124: 7(int) Load 82(tri_idx0)
|
||||||
121: 7(int) IMul 13 120
|
125: 7(int) IMul 13 124
|
||||||
122: 7(int) IAdd 121 24
|
126: 7(int) IAdd 125 24
|
||||||
123: 102(ptr) AccessChain 119 73 122
|
127: 107(ptr) AccessChain 123 79 126
|
||||||
124: 33(float) Load 123 Aligned 4
|
128: 39(float) Load 127 Aligned 4
|
||||||
125: 88(fvec3) CompositeConstruct 106 115 124
|
129: 94(fvec3) CompositeConstruct 110 119 128
|
||||||
126: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 95 95 12 12
|
130: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 35 35 12 12
|
||||||
Store 92(vertex_pos0) 125
|
Store 98(vertex_pos0) 129
|
||||||
136: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 134 134 12 12
|
140: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 138 138 12 12
|
||||||
135: 88(fvec3) Load 92(vertex_pos0)
|
139: 94(fvec3) Load 98(vertex_pos0)
|
||||||
138: 33(float) CompositeExtract 135 0
|
142: 39(float) CompositeExtract 139 0
|
||||||
139: 33(float) CompositeExtract 135 1
|
143: 39(float) CompositeExtract 139 1
|
||||||
140: 33(float) CompositeExtract 135 2
|
144: 39(float) CompositeExtract 139 2
|
||||||
141: 127(fvec4) CompositeConstruct 138 139 140 137
|
145: 131(fvec4) CompositeConstruct 142 143 144 141
|
||||||
Store 131(out_fragColor) 141
|
Store 135(out_fragColor) 145
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
166
Test/baseResults/spv.debuginfo.include.glsl.frag.out
Normal file
166
Test/baseResults/spv.debuginfo.include.glsl.frag.out
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
spv.debuginfo.include.glsl.frag
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 109
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Extension "SPV_KHR_non_semantic_info"
|
||||||
|
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
|
||||||
|
4: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 15 "main" 81
|
||||||
|
ExecutionMode 15 OriginUpperLeft
|
||||||
|
2: String "spv.debuginfo.include.glsl.frag"
|
||||||
|
3: String "spv.debuginfo.include.glsl.h"
|
||||||
|
9: String "uint"
|
||||||
|
18: String "float"
|
||||||
|
31: String "headerFunction"
|
||||||
|
34: String "// OpModuleProcessed auto-map-locations
|
||||||
|
// OpModuleProcessed auto-map-bindings
|
||||||
|
// OpModuleProcessed client vulkan100
|
||||||
|
// OpModuleProcessed target-env vulkan1.0
|
||||||
|
// OpModuleProcessed keep-uncalled
|
||||||
|
// OpModuleProcessed entry-point main
|
||||||
|
#line 1
|
||||||
|
#version 450
|
||||||
|
|
||||||
|
#extension GL_GOOGLE_include_directive : require
|
||||||
|
#include "spv.debuginfo.include.glsl.h"
|
||||||
|
|
||||||
|
vec4 mainFileFunction(vec4 v) {
|
||||||
|
return -v;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
headerOut = headerFunction(mainFileFunction(headerUboItem));
|
||||||
|
}"
|
||||||
|
40: String "a"
|
||||||
|
48: String "mainFileFunction"
|
||||||
|
51: String "v"
|
||||||
|
54: String "main"
|
||||||
|
60: String "
|
||||||
|
out vec4 headerOut;
|
||||||
|
|
||||||
|
uniform UBO {
|
||||||
|
vec4 headerUboItem;
|
||||||
|
};
|
||||||
|
|
||||||
|
vec4 headerFunction(vec4 a) {
|
||||||
|
return -a;
|
||||||
|
}"
|
||||||
|
83: String "headerOut"
|
||||||
|
87: String "headerUboItem"
|
||||||
|
90: String "UBO"
|
||||||
|
95: String ""
|
||||||
|
97: String "int"
|
||||||
|
SourceExtension "GL_GOOGLE_cpp_style_line_directive"
|
||||||
|
SourceExtension "GL_GOOGLE_include_directive"
|
||||||
|
Name 15 "main"
|
||||||
|
Name 29 "headerFunction(vf4;"
|
||||||
|
Name 28 "a"
|
||||||
|
Name 46 "mainFileFunction(vf4;"
|
||||||
|
Name 45 "v"
|
||||||
|
Name 81 "headerOut"
|
||||||
|
Name 85 "UBO"
|
||||||
|
MemberName 85(UBO) 0 "headerUboItem"
|
||||||
|
Name 93 ""
|
||||||
|
Name 100 "param"
|
||||||
|
Name 107 "param"
|
||||||
|
Decorate 81(headerOut) Location 0
|
||||||
|
MemberDecorate 85(UBO) 0 Offset 0
|
||||||
|
Decorate 85(UBO) Block
|
||||||
|
Decorate 93 DescriptorSet 0
|
||||||
|
Decorate 93 Binding 0
|
||||||
|
5: TypeVoid
|
||||||
|
6: TypeFunction 5
|
||||||
|
8: TypeInt 32 0
|
||||||
|
11: 8(int) Constant 32
|
||||||
|
12: 8(int) Constant 6
|
||||||
|
13: 8(int) Constant 0
|
||||||
|
10: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 11 12 13
|
||||||
|
14: 8(int) Constant 3
|
||||||
|
7: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 14 5
|
||||||
|
17: TypeFloat 32
|
||||||
|
19: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 18 11 14 13
|
||||||
|
20: TypeVector 17(float) 4
|
||||||
|
21: 8(int) Constant 4
|
||||||
|
22: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 19 21
|
||||||
|
23: TypePointer Function 20(fvec4)
|
||||||
|
24: 8(int) Constant 7
|
||||||
|
25: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 22 24 13
|
||||||
|
26: TypeFunction 20(fvec4) 23(ptr)
|
||||||
|
27: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 14 22 22
|
||||||
|
33: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 34
|
||||||
|
35: 8(int) Constant 8
|
||||||
|
37: 8(int) Constant 1
|
||||||
|
38: 8(int) Constant 2
|
||||||
|
36: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 37 21 33 38
|
||||||
|
32: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 31 27 33 35 13 36 31 14 35
|
||||||
|
39: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 40 22 33 35 13 32 21 37
|
||||||
|
42: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
|
||||||
|
49: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 48 27 33 12 13 36 48 14 12
|
||||||
|
50: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 51 22 33 12 13 49 21 37
|
||||||
|
56: 8(int) Constant 10
|
||||||
|
55: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 54 7 33 56 13 36 54 14 56
|
||||||
|
59: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 3 60
|
||||||
|
63: 8(int) Constant 9
|
||||||
|
79: TypePointer Output 20(fvec4)
|
||||||
|
80: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 22 14 13
|
||||||
|
81(headerOut): 79(ptr) Variable Output
|
||||||
|
84: 8(int) Constant 11
|
||||||
|
82: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 83 22 33 84 13 36 83 81(headerOut) 35
|
||||||
|
85(UBO): TypeStruct 20(fvec4)
|
||||||
|
88: 8(int) Constant 5
|
||||||
|
86: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 87 22 33 88 24 13 13 14
|
||||||
|
89: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 90 37 33 84 13 36 90 13 14 86
|
||||||
|
91: TypePointer Uniform 85(UBO)
|
||||||
|
92: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 89 38 13
|
||||||
|
93: 91(ptr) Variable Uniform
|
||||||
|
94: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 95 89 33 84 13 36 95 93 35
|
||||||
|
96: TypeInt 32 1
|
||||||
|
98: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 97 11 21 13
|
||||||
|
99: 96(int) Constant 0
|
||||||
|
101: TypePointer Uniform 20(fvec4)
|
||||||
|
102: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 22 38 13
|
||||||
|
15(main): 5 Function None 6
|
||||||
|
16: Label
|
||||||
|
100(param): 23(ptr) Variable Function
|
||||||
|
107(param): 23(ptr) Variable Function
|
||||||
|
77: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
|
||||||
|
78: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 33 56 56 13 13
|
||||||
|
76: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 55 15(main)
|
||||||
|
104: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 33 84 84 13 13
|
||||||
|
103: 101(ptr) AccessChain 93 99
|
||||||
|
105: 20(fvec4) Load 103
|
||||||
|
Store 100(param) 105
|
||||||
|
106: 20(fvec4) FunctionCall 46(mainFileFunction(vf4;) 100(param)
|
||||||
|
Store 107(param) 106
|
||||||
|
108: 20(fvec4) FunctionCall 29(headerFunction(vf4;) 107(param)
|
||||||
|
Store 81(headerOut) 108
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
29(headerFunction(vf4;): 20(fvec4) Function None 26
|
||||||
|
28(a): 23(ptr) FunctionParameter
|
||||||
|
30: Label
|
||||||
|
43: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 32
|
||||||
|
44: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 33 35 35 13 13
|
||||||
|
41: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 39 28(a) 42
|
||||||
|
58: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 59 35 35 13 13
|
||||||
|
57: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 32 29(headerFunction(vf4;)
|
||||||
|
62: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 59 63 63 13 13
|
||||||
|
61: 20(fvec4) Load 28(a)
|
||||||
|
64: 20(fvec4) FNegate 61
|
||||||
|
ReturnValue 64
|
||||||
|
FunctionEnd
|
||||||
|
46(mainFileFunction(vf4;): 20(fvec4) Function None 26
|
||||||
|
45(v): 23(ptr) FunctionParameter
|
||||||
|
47: Label
|
||||||
|
53: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 49
|
||||||
|
52: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 50 45(v) 42
|
||||||
|
69: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 33 12 12 13 13
|
||||||
|
68: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 49 46(mainFileFunction(vf4;)
|
||||||
|
71: 5 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 33 24 24 13 13
|
||||||
|
70: 20(fvec4) Load 45(v)
|
||||||
|
72: 20(fvec4) FNegate 70
|
||||||
|
ReturnValue 72
|
||||||
|
FunctionEnd
|
||||||
|
|
@ -86,5 +86,8 @@ void main()
|
||||||
b2.o = b2.p.x;
|
b2.o = b2.p.x;
|
||||||
b2.p = i16vec2(ivec2(1, 2));
|
b2.p = i16vec2(ivec2(1, 2));
|
||||||
b2.o = int16_t(3);
|
b2.o = int16_t(3);
|
||||||
|
b2.o = int16_t(b1.a);
|
||||||
|
b2.p = i16vec2(b1.b);
|
||||||
|
b2.q = i16vec3(b1.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,8 @@ void main()
|
||||||
b2.o = b2.p.x;
|
b2.o = b2.p.x;
|
||||||
b2.p = u16vec2(uvec2(1, 2));
|
b2.p = u16vec2(uvec2(1, 2));
|
||||||
b2.o = uint16_t(3u);
|
b2.o = uint16_t(3u);
|
||||||
|
b2.o = uint16_t(b1.a);
|
||||||
|
b2.p = u16vec2(b1.b);
|
||||||
|
b2.q = u16vec3(b1.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,8 @@ void main()
|
||||||
b2.o = b2.p.x;
|
b2.o = b2.p.x;
|
||||||
b2.p = f16vec2(vec2(1.0, 2.0));
|
b2.p = f16vec2(vec2(1.0, 2.0));
|
||||||
b2.o = float16_t(3.0);
|
b2.o = float16_t(3.0);
|
||||||
|
b2.o = float16_t(b1.a);
|
||||||
|
b2.p = f16vec2(b1.b);
|
||||||
|
b2.q = f16vec3(b1.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,8 @@ void main()
|
||||||
b2.o = b2.p.x;
|
b2.o = b2.p.x;
|
||||||
b2.p = i8vec2(ivec2(1, 2));
|
b2.p = i8vec2(ivec2(1, 2));
|
||||||
b2.o = int8_t(3);
|
b2.o = int8_t(3);
|
||||||
|
b2.o = int8_t(b1.a);
|
||||||
|
b2.p = i8vec2(b1.b);
|
||||||
|
b2.q = i8vec3(b1.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,8 @@ void main()
|
||||||
b2.o = b2.p.x;
|
b2.o = b2.p.x;
|
||||||
b2.p = u8vec2(uvec2(1, 2));
|
b2.p = u8vec2(uvec2(1, 2));
|
||||||
b2.o = uint8_t(3u);
|
b2.o = uint8_t(3u);
|
||||||
|
b2.o = uint8_t(b1.a);
|
||||||
|
b2.p = u8vec2(b1.b);
|
||||||
|
b2.q = u8vec3(b1.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
121
Test/spv.coopmat_armlayout.comp
Normal file
121
Test/spv.coopmat_armlayout.comp
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
#extension GL_EXT_buffer_reference : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
const int X = 8;
|
||||||
|
layout(constant_id = 0) const int Y = 2;
|
||||||
|
const int Z = X*Y;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mC;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mC2[3];
|
||||||
|
|
||||||
|
layout(constant_id = 1) const float F = 3.0;
|
||||||
|
|
||||||
|
const coopmat<float, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mD = coopmat<float, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
const coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> mD2 = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(1);
|
||||||
|
|
||||||
|
struct S { int a; int b; int c; };
|
||||||
|
|
||||||
|
const S s = S(12, 23, 34);
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0, buffer_reference) coherent buffer Block {
|
||||||
|
float y[1024*1024];
|
||||||
|
float x[];
|
||||||
|
} block;
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0) coherent buffer Block16 {
|
||||||
|
float16_t y[1024*1024];
|
||||||
|
float16_t x[];
|
||||||
|
|
||||||
|
Block b;
|
||||||
|
} block16;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> f16(coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> m) { return -m; }
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> f32(coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> m) { return -m; }
|
||||||
|
|
||||||
|
layout(constant_id = 2) const int SC = 1;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, SC, SC, gl_MatrixUseAccumulator> scm[SC][SC];
|
||||||
|
|
||||||
|
// sized for coopmat<float16_t, gl_ScopeSubgroup, 16, 16, gl_MatrixUseAccumulator>
|
||||||
|
shared uvec4 shmatrix[16*16*2/16];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator> m = coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
m = m + m;
|
||||||
|
m = m - m;
|
||||||
|
m = -m;
|
||||||
|
m = 2.0*m;
|
||||||
|
m = m*2.0;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> m2 = coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator>(m);
|
||||||
|
|
||||||
|
float x = m[1];
|
||||||
|
m[0] = x;
|
||||||
|
|
||||||
|
coopMatLoad(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatLoad(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatLoad(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> A;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> B;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> C;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> D;
|
||||||
|
D = coopMatMulAdd(A, B, C);
|
||||||
|
|
||||||
|
int l = D.length();
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> E;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, Z, gl_MatrixUseAccumulator> F = coopmat<float16_t, gl_ScopeSubgroup, Z, Z, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator> a[5];
|
||||||
|
a[3][0] = 1.0;
|
||||||
|
|
||||||
|
float md1 = mD[1];
|
||||||
|
|
||||||
|
md1 += (m += m)[1234];
|
||||||
|
|
||||||
|
mC2[1] = mC2[2];
|
||||||
|
|
||||||
|
coopMatLoad(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatLoad(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> p1;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> p2;
|
||||||
|
|
||||||
|
p1 = f16(p1);
|
||||||
|
p2 = f32(p2);
|
||||||
|
|
||||||
|
p1 = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
p2 = coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
p1 /= p1;
|
||||||
|
|
||||||
|
p1 *= float16_t(2.0);
|
||||||
|
p2 *= 4.0;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> ms;
|
||||||
|
coopMatLoad(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
coopMatStore(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> ms8A;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> ms8B;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> ms8C;
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C);
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C, 0);
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C, gl_MatrixOperandsSaturatingAccumulation);
|
||||||
|
|
||||||
|
coopmat<int16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> m16;
|
||||||
|
coopMatStore(m16, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowBlockedInterleavedARM);
|
||||||
|
}
|
||||||
|
|
@ -1,83 +1,83 @@
|
||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
struct S {
|
struct S {
|
||||||
int a;
|
int a;
|
||||||
};
|
};
|
||||||
|
|
||||||
uniform ubuf {
|
uniform ubuf {
|
||||||
S s;
|
S s;
|
||||||
};
|
};
|
||||||
|
|
||||||
uniform sampler2D s2d;
|
uniform sampler2D s2d;
|
||||||
|
|
||||||
layout(location = 0) in vec4 inv;
|
layout(location = 0) in vec4 inv;
|
||||||
layout(location = 0) out vec4 outv;
|
layout(location = 0) out vec4 outv;
|
||||||
|
|
||||||
vec4 foo(S s)
|
vec4 foo(S s)
|
||||||
{
|
{
|
||||||
vec4 r = s.a * inv;
|
vec4 r = s.a * inv;
|
||||||
++r;
|
++r;
|
||||||
if (r.x > 3.0)
|
if (r.x > 3.0)
|
||||||
--r;
|
--r;
|
||||||
else
|
else
|
||||||
r *= 2;
|
r *= 2;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
float testBranch(float x, float y)
|
float testBranch(float x, float y)
|
||||||
{
|
{
|
||||||
float result = 0;
|
float result = 0;
|
||||||
bool b = x > 0;
|
bool b = x > 0;
|
||||||
|
|
||||||
// branch with load
|
// branch with load
|
||||||
if (b) {
|
if (b) {
|
||||||
result += 1;
|
result += 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result -= 1;
|
result -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// branch with expression
|
// branch with expression
|
||||||
if (x > y) {
|
if (x > y) {
|
||||||
result += x - y;
|
result += x - y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// selection with load
|
// selection with load
|
||||||
result += b ?
|
result += b ?
|
||||||
1 : -1;
|
1 : -1;
|
||||||
|
|
||||||
// selection with expression
|
// selection with expression
|
||||||
result += x < y ?
|
result += x < y ?
|
||||||
y :
|
y :
|
||||||
float(b);
|
float(b);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
outv = foo(s);
|
outv = foo(s);
|
||||||
outv += testBranch(inv.x, inv.y);
|
outv += testBranch(inv.x, inv.y);
|
||||||
outv += texture(s2d, vec2(0.5));
|
outv += texture(s2d, vec2(0.5));
|
||||||
|
|
||||||
switch (s.a) {
|
switch (s.a) {
|
||||||
case 10:
|
case 10:
|
||||||
++outv;
|
++outv;
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
outv = 2 * outv;
|
outv = 2 * outv;
|
||||||
++outv;
|
++outv;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
--outv;
|
--outv;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 10; ++i)
|
for (int i = 0; i < 10; ++i)
|
||||||
outv *= 3.0;
|
outv *= 3.0;
|
||||||
|
|
||||||
outv.x < 10.0 ?
|
outv.x < 10.0 ?
|
||||||
outv = sin(outv) :
|
outv = sin(outv) :
|
||||||
outv = cos(outv);
|
outv = cos(outv);
|
||||||
}
|
}
|
||||||
12
Test/spv.debuginfo.include.glsl.frag
Normal file
12
Test/spv.debuginfo.include.glsl.frag
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#version 450
|
||||||
|
|
||||||
|
#extension GL_GOOGLE_include_directive : require
|
||||||
|
#include "spv.debuginfo.include.glsl.h"
|
||||||
|
|
||||||
|
vec4 mainFileFunction(vec4 v) {
|
||||||
|
return -v;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
headerOut = headerFunction(mainFileFunction(headerUboItem));
|
||||||
|
}
|
||||||
10
Test/spv.debuginfo.include.glsl.h
Normal file
10
Test/spv.debuginfo.include.glsl.h
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
out vec4 headerOut;
|
||||||
|
|
||||||
|
uniform UBO {
|
||||||
|
vec4 headerUboItem;
|
||||||
|
};
|
||||||
|
|
||||||
|
vec4 headerFunction(vec4 a) {
|
||||||
|
return -a;
|
||||||
|
}
|
||||||
|
|
@ -169,6 +169,7 @@ set(GLSLANG_HEADERS
|
||||||
Include/Types.h)
|
Include/Types.h)
|
||||||
|
|
||||||
add_library(glslang ${LIB_TYPE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
|
add_library(glslang ${LIB_TYPE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
|
||||||
|
add_library(glslang::glslang ALIAS glslang)
|
||||||
set_target_properties(glslang PROPERTIES
|
set_target_properties(glslang PROPERTIES
|
||||||
FOLDER glslang
|
FOLDER glslang
|
||||||
POSITION_INDEPENDENT_CODE ON
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
|
@ -201,6 +202,7 @@ set(RESOURCELIMITS_HEADERS
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(glslang-default-resource-limits ${RESOURCELIMITS_SOURCES} ${RESOURCELIMITS_HEADERS})
|
add_library(glslang-default-resource-limits ${RESOURCELIMITS_SOURCES} ${RESOURCELIMITS_HEADERS})
|
||||||
|
add_library(glslang::glslang-default-resource-limits ALIAS glslang-default-resource-limits)
|
||||||
set_target_properties(glslang-default-resource-limits PROPERTIES
|
set_target_properties(glslang-default-resource-limits PROPERTIES
|
||||||
VERSION "${GLSLANG_VERSION}"
|
VERSION "${GLSLANG_VERSION}"
|
||||||
SOVERSION "${GLSLANG_VERSION_MAJOR}"
|
SOVERSION "${GLSLANG_VERSION_MAJOR}"
|
||||||
|
|
|
||||||
|
|
@ -4558,6 +4558,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n"
|
"const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n"
|
||||||
"const int gl_CooperativeMatrixLayoutRowMajor = 0;\n"
|
"const int gl_CooperativeMatrixLayoutRowMajor = 0;\n"
|
||||||
"const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n"
|
"const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n"
|
||||||
|
"const int gl_CooperativeMatrixLayoutRowBlockedInterleavedARM = 4202;\n"
|
||||||
|
"const int gl_CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203;\n"
|
||||||
"\n"
|
"\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
// Copyright (C) 2017, 2019 ARM Limited.
|
// Copyright (C) 2017, 2019 ARM Limited.
|
||||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
// Modifications Copyright (C) 2024 Ravi Prakash Singh.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -8540,7 +8541,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
||||||
basicOp = EOpConstructFloat16;
|
basicOp = EOpConstructFloat16;
|
||||||
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
||||||
// so construct a 32-bit type and convert
|
// so construct a 32-bit type and convert
|
||||||
if (!intermediate.getArithemeticFloat16Enabled()) {
|
// and do not generate any conversion if it is an identity conversion, i.e. float16_t(<float16_t> var)
|
||||||
|
if (!intermediate.getArithemeticFloat16Enabled() && (node->getBasicType() != EbtFloat16)) {
|
||||||
TType tempType(EbtFloat, EvqTemporary, type.getVectorSize());
|
TType tempType(EbtFloat, EvqTemporary, type.getVectorSize());
|
||||||
newNode = node;
|
newNode = node;
|
||||||
if (tempType != newNode->getType()) {
|
if (tempType != newNode->getType()) {
|
||||||
|
|
@ -8563,7 +8565,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
||||||
basicOp = EOpConstructInt8;
|
basicOp = EOpConstructInt8;
|
||||||
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
||||||
// so construct a 32-bit type and convert
|
// so construct a 32-bit type and convert
|
||||||
if (!intermediate.getArithemeticInt8Enabled()) {
|
// and do not generate any conversion if it is an identity conversion, i.e. int8_t(<int8_t> var)
|
||||||
|
if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtInt8)) {
|
||||||
TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
|
TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
|
||||||
newNode = node;
|
newNode = node;
|
||||||
if (tempType != newNode->getType()) {
|
if (tempType != newNode->getType()) {
|
||||||
|
|
@ -8586,7 +8589,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
||||||
basicOp = EOpConstructUint8;
|
basicOp = EOpConstructUint8;
|
||||||
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
||||||
// so construct a 32-bit type and convert
|
// so construct a 32-bit type and convert
|
||||||
if (!intermediate.getArithemeticInt8Enabled()) {
|
// and do not generate any conversion if it is an identity conversion, i.e. uint8_t(<uint8_t> var)
|
||||||
|
if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtUint8)) {
|
||||||
TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
|
TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
|
||||||
newNode = node;
|
newNode = node;
|
||||||
if (tempType != newNode->getType()) {
|
if (tempType != newNode->getType()) {
|
||||||
|
|
@ -8609,7 +8613,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
||||||
basicOp = EOpConstructInt16;
|
basicOp = EOpConstructInt16;
|
||||||
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
||||||
// so construct a 32-bit type and convert
|
// so construct a 32-bit type and convert
|
||||||
if (!intermediate.getArithemeticInt16Enabled()) {
|
// and do not generate any conversion if it is an identity conversion, i.e. int16_t(<int16_t> var)
|
||||||
|
if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtInt16)) {
|
||||||
TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
|
TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
|
||||||
newNode = node;
|
newNode = node;
|
||||||
if (tempType != newNode->getType()) {
|
if (tempType != newNode->getType()) {
|
||||||
|
|
@ -8632,7 +8637,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
||||||
basicOp = EOpConstructUint16;
|
basicOp = EOpConstructUint16;
|
||||||
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
|
||||||
// so construct a 32-bit type and convert
|
// so construct a 32-bit type and convert
|
||||||
if (!intermediate.getArithemeticInt16Enabled()) {
|
// and do not generate any conversion if it is an identity conversion, i.e. uint16_t(<uint16_t> var)
|
||||||
|
if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtUint16)) {
|
||||||
TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
|
TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
|
||||||
newNode = node;
|
newNode = node;
|
||||||
if (tempType != newNode->getType()) {
|
if (tempType != newNode->getType()) {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ std::string FileNameAsCustomTestSuffixIoMap(
|
||||||
using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileVulkanToSpirvTestNoLink = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkanToSpirvTestNoLink = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
|
||||||
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileToSpirv14Test = 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>>;
|
||||||
|
|
@ -82,7 +81,8 @@ using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam<std::st
|
||||||
using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileVulkanToSpirv14TestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileVulkanToSpirv14TestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
using CompileVulkanToNonSemanticShaderDebugInfoTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
using GlslSpirvDebugInfoTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
|
using GlslNonSemanticShaderDebugInfoTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||||
|
|
||||||
// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
|
// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
|
||||||
// generate SPIR-V.
|
// generate SPIR-V.
|
||||||
|
|
@ -110,17 +110,6 @@ TEST_P(CompileVulkanToSpirvDeadCodeElimTest, FromFile)
|
||||||
Target::Spv);
|
Target::Spv);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compiling GLSL to SPIR-V with debug info under Vulkan semantics. Expected
|
|
||||||
// to successfully generate SPIR-V.
|
|
||||||
TEST_P(CompileVulkanToDebugSpirvTest, FromFile)
|
|
||||||
{
|
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
|
||||||
Source::GLSL, Semantics::Vulkan,
|
|
||||||
glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
|
||||||
Target::Spv, true, "",
|
|
||||||
"/baseResults/", false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
||||||
{
|
{
|
||||||
|
|
@ -251,11 +240,18 @@ TEST_P(CompileUpgradeTextureToSampledTextureAndDropSamplersTest, FromFile)
|
||||||
Target::Spv);
|
Target::Spv);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(CompileVulkanToNonSemanticShaderDebugInfoTest, FromFile)
|
TEST_P(GlslSpirvDebugInfoTest, FromFile)
|
||||||
{
|
{
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), Source::GLSL, Semantics::Vulkan,
|
||||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, Target::Spv, true, "",
|
||||||
Target::Spv, true, "", "/baseResults/", false, true, true);
|
"/baseResults/", false, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(GlslNonSemanticShaderDebugInfoTest, FromFile)
|
||||||
|
{
|
||||||
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), Source::GLSL, Semantics::Vulkan,
|
||||||
|
glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, Target::Spv, true, "",
|
||||||
|
"/baseResults/", false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
@ -367,6 +363,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
"spv.coopmat.comp",
|
"spv.coopmat.comp",
|
||||||
"spv.coopmat_Error.comp",
|
"spv.coopmat_Error.comp",
|
||||||
"spv.coopmatKHR.comp",
|
"spv.coopmatKHR.comp",
|
||||||
|
"spv.coopmat_armlayout.comp",
|
||||||
"spv.coopmatKHR_arithmetic.comp",
|
"spv.coopmatKHR_arithmetic.comp",
|
||||||
"spv.coopmatKHR_arithmeticError.comp",
|
"spv.coopmatKHR_arithmeticError.comp",
|
||||||
"spv.coopmatKHR_Error.comp",
|
"spv.coopmatKHR_Error.comp",
|
||||||
|
|
@ -583,15 +580,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
|
||||||
Glsl, CompileVulkanToDebugSpirvTest,
|
|
||||||
::testing::ValuesIn(std::vector<std::string>({
|
|
||||||
"spv.pp.line.frag",
|
|
||||||
})),
|
|
||||||
FileNameAsCustomTestSuffix
|
|
||||||
);
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
Glsl, CompileVulkan1_1ToSpirvTest,
|
Glsl, CompileVulkan1_1ToSpirvTest,
|
||||||
|
|
@ -944,7 +932,15 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
);
|
);
|
||||||
|
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
Glsl, CompileVulkanToNonSemanticShaderDebugInfoTest,
|
Glsl, GlslSpirvDebugInfoTest,
|
||||||
|
::testing::ValuesIn(std::vector<std::string>({
|
||||||
|
"spv.pp.line.frag",
|
||||||
|
})),
|
||||||
|
FileNameAsCustomTestSuffix
|
||||||
|
);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
Glsl, GlslNonSemanticShaderDebugInfoTest,
|
||||||
::testing::ValuesIn(std::vector<std::string>({
|
::testing::ValuesIn(std::vector<std::string>({
|
||||||
"spv.debuginfo.glsl.vert",
|
"spv.debuginfo.glsl.vert",
|
||||||
"spv.debuginfo.glsl.frag",
|
"spv.debuginfo.glsl.frag",
|
||||||
|
|
@ -956,6 +952,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
"spv.debuginfo.const_params.glsl.comp",
|
"spv.debuginfo.const_params.glsl.comp",
|
||||||
"spv.debuginfo.scalar_types.glsl.frag",
|
"spv.debuginfo.scalar_types.glsl.frag",
|
||||||
"spv.debuginfo.rt_types.glsl.rgen",
|
"spv.debuginfo.rt_types.glsl.rgen",
|
||||||
|
"spv.debuginfo.include.glsl.frag",
|
||||||
})),
|
})),
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#ifndef GLSLANG_GTESTS_TEST_FIXTURE_H
|
#ifndef GLSLANG_GTESTS_TEST_FIXTURE_H
|
||||||
#define GLSLANG_GTESTS_TEST_FIXTURE_H
|
#define GLSLANG_GTESTS_TEST_FIXTURE_H
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
@ -199,9 +200,42 @@ public:
|
||||||
} else
|
} else
|
||||||
shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1);
|
shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1);
|
||||||
if (!entryPointName.empty()) shader->setEntryPoint(entryPointName.c_str());
|
if (!entryPointName.empty()) shader->setEntryPoint(entryPointName.c_str());
|
||||||
return shader->parse(
|
|
||||||
(resources ? resources : GetDefaultResources()),
|
// A includer that always assumes header name is a relative path to the test folder.
|
||||||
defaultVersion, isForwardCompatible, controls);
|
class GlslangTestIncluder : public glslang::TShader::Includer {
|
||||||
|
public:
|
||||||
|
virtual IncludeResult* includeLocal(const char* headerName, const char* /*includerName*/,
|
||||||
|
size_t /*inclusionDepth*/) override
|
||||||
|
{
|
||||||
|
std::string path = GLSLANG_TEST_DIRECTORY;
|
||||||
|
path += '/';
|
||||||
|
path += headerName;
|
||||||
|
std::replace(path.begin(), path.end(), '\\', '/');
|
||||||
|
|
||||||
|
auto [success, fileContent] = ReadFile(path);
|
||||||
|
if (success) {
|
||||||
|
auto buffer = new char[fileContent.size() + 1];
|
||||||
|
std::copy(fileContent.begin(), fileContent.end(), buffer);
|
||||||
|
buffer[fileContent.size()] = '\0';
|
||||||
|
|
||||||
|
return new IncludeResult(headerName, buffer, fileContent.size(), buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void releaseInclude(IncludeResult* result) override
|
||||||
|
{
|
||||||
|
if (result != nullptr) {
|
||||||
|
delete[] static_cast<char*>(result->userData);
|
||||||
|
delete result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GlslangTestIncluder includer;
|
||||||
|
return shader->parse((resources ? resources : GetDefaultResources()), defaultVersion, isForwardCompatible,
|
||||||
|
controls, includer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compiles and links the given source |code| of the given shader
|
// Compiles and links the given source |code| of the given shader
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
{
|
{
|
||||||
"commits" : [
|
"commits" : [
|
||||||
{
|
{
|
||||||
"name" : "spirv-tools",
|
"name" : "spirv-tools",
|
||||||
"site" : "github",
|
"site" : "github",
|
||||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||||
"subdir" : "External/spirv-tools",
|
"subdir" : "External/spirv-tools",
|
||||||
"commit": "148c97f6876e427efd76d2328122c3075eab4b8f"
|
"commit": "bc28ac7c195f59b14535edec8472d97fd32a91ad"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "spirv-tools/external/spirv-headers",
|
"name" : "spirv-tools/external/spirv-headers",
|
||||||
"site" : "github",
|
"site" : "github",
|
||||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||||
"commit" : "ea77f2a826bc820cb8f57f9b2a7c7eccb681c731"
|
"commit" : "2acb319af38d43be3ea76bfabf3998e5281d8d12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "googletest",
|
"name": "googletest",
|
||||||
"site": "github",
|
"site": "github",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue