build: update glslang to latest version

This commit is contained in:
Kai Angulo 2024-10-23 23:26:46 -07:00
commit 413a51ee6d
710 changed files with 18932 additions and 14484 deletions

View file

@ -41,9 +41,9 @@ jobs:
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- name: Install Ubuntu Package Dependencies
@ -62,8 +62,7 @@ jobs:
- name: Test
run: |
cd build
ctest --output-on-failure &&
cd ../Test && ./runtests
ctest --output-on-failure
- name: Zip
if: ${{ matrix.compiler.cc == 'clang' }}
env:
@ -101,13 +100,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [{genus: macos-11, family: osx}]
os: [{genus: macos-13, family: osx}]
compiler: [{cc: clang, cxx: clang++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- run: ./update_glslang_sources.py
@ -122,8 +121,7 @@ jobs:
- name: Test
run: |
cd build
ctest --output-on-failure &&
cd ../Test && ./runtests
ctest --output-on-failure
- name: Zip
env:
ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
@ -162,9 +160,9 @@ jobs:
os: [{genus: windows-2019, family: windows}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- run: python update_glslang_sources.py
@ -176,7 +174,6 @@ jobs:
run: |
cd build
ctest -C ${{matrix.cmake_build_type}} --output-on-failure
cd ../Test && bash runtests
- name: Zip
if: ${{ matrix.cmake_build_type == 'Debug' }}
env:

View file

@ -17,13 +17,13 @@ jobs:
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}
- run: ./update_glslang_sources.py
@ -41,8 +41,41 @@ jobs:
run: cmake --install build --prefix build/install
- name: Test
run: ctest --output-on-failure --test-dir build
- name: Test (standalone)
run: cd Test && ./runtests
- name: Check known validation failure list
run: grep -l 'Validation failed' Test/baseResults/* | sort -fd | diff -u Test/baseResults/validation_fails.txt -
linux-shared:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Release]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- name: Setup ccache
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}
- run: ./update_glslang_sources.py
- name: Configure
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build --prefix build/install
- name: Test
run: ctest --output-on-failure --test-dir build
linux-asan:
runs-on: ubuntu-22.04
@ -51,15 +84,15 @@ jobs:
matrix:
compiler: [{cc: gcc, cxx: g++}]
cmake_build_type: [Debug]
flags: ['-fsanitize=address', '-fsanitize=thread']
flags: ['-fsanitize=address', '-fsanitize=thread', '-fsanitize=undefined']
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}-${{matrix.flags}}
# This is to combat a bug when using 6.6 linux kernels with thread/address sanitizer
@ -82,24 +115,24 @@ jobs:
- name: Install
run: cmake --install build --prefix build/install
- name: Test
env:
UBSAN_OPTIONS: 'halt_on_error=1:print_stacktrace=1'
run: ctest --output-on-failure --test-dir build
- name: Test (standalone)
run: cd Test && ./runtests
# Ensure we can compile/run on an older distro
linux_min:
name: Linux Backcompat
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
with:
cmakeVersion: 3.17.2
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: linux_backcompat
- run: ./update_glslang_sources.py
@ -114,8 +147,6 @@ jobs:
run: cmake --install build --prefix build/install
- name: Test
run: ctest --output-on-failure --test-dir build
- name: Test (standalone)
run: cd Test && ./runtests
macos:
runs-on: ${{matrix.os}}
@ -126,8 +157,8 @@ jobs:
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- 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
env:
@ -136,9 +167,26 @@ jobs:
- run: cmake --build build
- run: cmake --install build --prefix build/install
- run: ctest --output-on-failure --test-dir build
- name: Test Script (standalone)
run: ./runtests
working-directory: Test
macos-shared:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [macos-14]
compiler: [{cc: clang, cxx: clang++}]
cmake_build_type: [Release]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- 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 -DBUILD_SHARED_LIBS=ON
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
- run: cmake --build build
- run: cmake --install build --prefix build/install
- run: ctest --output-on-failure --test-dir build
windows:
runs-on: ${{matrix.os.genus}}
@ -150,9 +198,9 @@ jobs:
os: [{genus: windows-2019, family: windows}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- run: python update_glslang_sources.py
@ -162,16 +210,38 @@ jobs:
cmake --build build --config ${{matrix.cmake_build_type}} --target install
- name: Test
run: ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build
- name: Test (standalone)
run: bash -c 'cd ./Test && ./runtests'
windows-shared:
runs-on: ${{matrix.os.genus}}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [{genus: windows-2019, family: windows}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- run: python update_glslang_sources.py
- name: Build
run: |
cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON
cmake --build build --config ${{matrix.cmake_build_type}} --target install
# disabled until we figure out DLL issues.
# - name: Test
# run: ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build
iOS:
runs-on: macos-13
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: IOS
- run: ./update_glslang_sources.py
@ -197,10 +267,10 @@ jobs:
# Test both to ensure we are compatible with either approach.
LEGACY: [ON, OFF]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: android-${{ matrix.LEGACY }}
- run: ./update_glslang_sources.py
@ -220,13 +290,13 @@ jobs:
emscripten:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@18d87816d12dd87ec1449d47b9b3a587e0a1cc19 # v3.29.5
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 # v3.30.5
- name: Setup ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: ubuntu-emscripten
- uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14

View file

@ -23,12 +23,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
@ -40,7 +40,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
@ -48,6 +48,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: results.sarif

View file

@ -59,9 +59,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE:=OSDependent
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
LOCAL_SRC_FILES:=glslang/stub.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH)
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@ -73,7 +72,8 @@ $(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \
LOCAL_MODULE:=glslang
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) \
$(LOCAL_PATH)/glslang/OSDependent/Unix
LOCAL_SRC_FILES:= \
glslang/CInterface/glslang_c_interface.cpp \
glslang/GenericCodeGen/CodeGen.cpp \
@ -112,23 +112,8 @@ LOCAL_SRC_FILES:= \
glslang/MachineIndependent/preprocessor/PpContext.cpp \
glslang/MachineIndependent/preprocessor/Pp.cpp \
glslang/MachineIndependent/preprocessor/PpScanner.cpp \
glslang/MachineIndependent/preprocessor/PpTokens.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
$(LOCAL_PATH)/glslang/MachineIndependent \
$(GLSLANG_GENERATED_INCLUDEDIR) \
$(GLSLANG_OUT_PATH)
LOCAL_STATIC_LIBRARIES:=OSDependent
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# GlslangToSpv.cpp depends on the generated build_info.h
$(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
$(GLSLANG_BUILD_INFO_H)
LOCAL_MODULE:=SPIRV
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
LOCAL_SRC_FILES:= \
glslang/MachineIndependent/preprocessor/PpTokens.cpp \
glslang/OSDependent/Unix/ossource.cpp \
SPIRV/CInterface/spirv_c_interface.cpp \
SPIRV/GlslangToSpv.cpp \
SPIRV/InReadableOrder.cpp \
@ -140,8 +125,22 @@ LOCAL_SRC_FILES:= \
SPIRV/disassemble.cpp \
SPIRV/doc.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
$(LOCAL_PATH)/glslang/SPIRV \
$(GLSLANG_GENERATED_INCLUDEDIR)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
LOCAL_STATIC_LIBRARIES:=glslang
$(LOCAL_PATH)/glslang/MachineIndependent \
$(LOCAL_PATH)/glslang/OSDependent/Unix \
$(LOCAL_PATH)/SPIRV \
$(GLSLANG_GENERATED_INCLUDEDIR) \
$(GLSLANG_OUT_PATH)
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# GlslangToSpv.cpp depends on the generated build_info.h
$(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
$(GLSLANG_BUILD_INFO_H)
LOCAL_MODULE:=SPIRV
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
LOCAL_SRC_FILES:=glslang/stub.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
include $(BUILD_STATIC_LIBRARY)

View file

@ -159,6 +159,7 @@ template("glslang_sources_common") {
"glslang/Include/Types.h",
"glslang/Include/arrays.h",
"glslang/Include/intermediate.h",
"glslang/Include/visibility.h",
"glslang/MachineIndependent/Constant.cpp",
"glslang/MachineIndependent/InfoSink.cpp",
"glslang/MachineIndependent/Initialize.cpp",
@ -234,7 +235,7 @@ template("glslang_sources_common") {
]
}
defines = []
defines = [ "ENABLE_SPIRV=1" ]
if (invoker.enable_opt) {
sources += [ "SPIRV/SpvTools.cpp" ]
defines += [ "ENABLE_OPT=1" ]
@ -301,6 +302,7 @@ source_set("glslang_default_resource_limits_sources") {
"glslang/ResourceLimits/ResourceLimits.cpp",
"glslang/Public/ResourceLimits.h",
"glslang/Include/ResourceLimits.h",
"glslang/Include/visibility.h",
]
public_configs = [ ":glslang_public" ]
@ -316,7 +318,10 @@ executable("glslang_validator") {
if (!is_win) {
cflags = [ "-Woverflow" ]
}
defines = [ "ENABLE_OPT=1" ]
defines = [
"ENABLE_OPT=1",
"ENABLE_SPIRV=1",
]
deps = [
":glslang_build_info",
":glslang_default_resource_limits_sources",
@ -336,7 +341,10 @@ executable("glslang_validator") {
executable("spirv-remap") {
sources = [ "StandAlone/spirv-remap.cpp" ]
defines = [ "ENABLE_OPT=1" ]
defines = [
"ENABLE_OPT=1",
"ENABLE_SPIRV=1",
]
deps = [ ":glslang_sources" ]
include_dirs = [ "${spirv_tools_dir}/include" ]

View file

@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
## 15.0.0 2024-09-23
### Breaking changes
* Explicitly export all symbols that are part of the public API and hide other symbols by default
### Other changes
* Allow building glslang without the SPIR-V backend using the new ENABLE_SPIRV build option
* Add setResourceSetBinding method to the API
* Add interface to get the GLSL IO mapper and resolver
* Allow compute derivative modes when the workgroup dimensions are spec constants
* Improve debug location of branch/return instructions
* Silence preprocessor '#' error reporting in inactive #if/#ifdef/#elif/#else blocks
* Apply GLSL memory decorations to top-level OpVariable
* Move definition of GLSLANG_EXPORT to visibility.h
* Merge ancillary libraries into main glslang library and stub originals
* Add public setSourceFile and addSourceText methods to TShader class
* Add type checks for hitObjectNV
* Add optimizerAllowExpandedIDBound to SpvOptions
* Add SpvTools.h back to public headers
* Add cross-stage check for missing outputs
* Fix HLSL offsets for non-buffers
* Add types and functions for IO mapping to API
* Add function to set preprocessed code to API
* Add set/get version functions to API
* Expose setGlobalUniform functions to API
* Don't emit debug instructions before an OpPhi
* Add command-line and API option to enable reporting column location for compiler errors
* Improve location aliasing checks
* Support constant expression calculated by matrixCompMult
* Fix crash caused by atomicCounter() use without arguments
* Fix multi-line function call line numbers
* Add line info to OpDebugDeclare for function parameters
* Fix HLSL OpDebugFunction file name
* Fix duplicate decorations
* Enable compilation of glslang without thread support for WASI
## 14.3.0 2024-06-25
* Generate vector constructions more efficiently when sizes match
* Skip identity conversions for 8-bit and 16-bit types
* Add cmake aliases for public libraries
* Support ARM extended matrix layout
* Emit debug info for buffer references
* Add support for OpExtInstWithForwardRefsKHR
* Generate SPV_EXT_replicated_compisites when requested by pragma
* Reuse loads generated for repeated function arguments
* Fix gl_HitT alias of gl_RayTmax
* Fix some cases where invalid SPIR-V was being generated when using separate samplers
* Add back layoutLocation to public API
## 14.2.0 2024-05-02
* Improve checking for location aliasing errors
* Fix undefined behavior in parser

View file

@ -97,6 +97,7 @@ option(GLSLANG_TESTS "Enable glslang testing" ${GLSLANG_TESTS_DEFAULT})
# Always expose this as an option, so the defaults can be overridden.
option(GLSLANG_ENABLE_INSTALL "Enable glslang installation" ${GLSLANG_ENABLE_INSTALL_DEFAULT})
option(ENABLE_SPIRV "Enables SPIRV output support" ON)
option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON)
option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" ON)
@ -114,7 +115,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE
option(ENABLE_HLSL "Enables HLSL input support" ON)
option(ENABLE_RTTI "Enables RTTI")
option(ENABLE_EXCEPTIONS "Enables Exceptions")
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
CMAKE_DEPENDENT_OPTION(ENABLE_OPT "Enables spirv-opt capability if present" ON "ENABLE_SPIRV" OFF)
if(MINGW OR (APPLE AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU"))
# Workaround for CMake behavior on Mac OS with gcc, cmake generates -Xarch_* arguments
@ -125,6 +126,10 @@ endif()
option(ENABLE_PCH "Enables Precompiled header" ON)
if(ENABLE_SPIRV)
add_compile_definitions(ENABLE_SPIRV)
endif()
if(ENABLE_HLSL)
add_compile_definitions(ENABLE_HLSL)
endif()
@ -262,7 +267,8 @@ endfunction()
function(glslang_only_export_explicit_symbols target)
if(BUILD_SHARED_LIBS)
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
set_target_properties(${target} PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${target} PROPERTIES C_VISIBILITY_PRESET hidden)
if(WIN32)
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
endif()
@ -313,11 +319,13 @@ else()
add_definitions(-DENABLE_OPT=0)
endif()
if(ENABLE_SPIRV)
add_subdirectory(SPIRV)
endif()
add_subdirectory(glslang)
if(ENABLE_GLSLANG_BINARIES)
add_subdirectory(StandAlone)
endif()
add_subdirectory(SPIRV)
if(GLSLANG_TESTS)
enable_testing()

View file

@ -4,9 +4,13 @@
# News
1. `OGLCompiler` and `HLSL` stub libraries have been fully removed from the build.
1. Building glslang as a DLL or shared library is now possible and supported.
2. `OVERRIDE_MSVCCRT` has been removed in favor of `CMAKE_MSVC_RUNTIME_LIBRARY`
2. The `GenericCodeGen`, `MachineIndependent`, `OSDependent`, and `SPIRV` libraries have been integrated into the main `glslang` library. The old separate libraries have replaced with empty stubs for a temporary compatibility period, and they will be removed entirely in the future.
3. A new CMake `ENABLE_SPIRV` option has been added to control whether glslang is built with SPIR-V support. Its default value is `ON`.
4. `OGLCompiler` and `HLSL` stub libraries have been fully removed from the build.
Users are encouraged to utilize the standard approach via [CMAKE_MSVC_RUNTIME_LIBRARY](https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html).

View file

@ -34,6 +34,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "glslang/Include/glslang_c_interface.h"
#include <cstring>
#include "glslang/Public/ShaderLang.h"
#include "SPIRV/GlslangToSpv.h"
#include "SPIRV/Logger.h"
#include "SPIRV/SpvTools.h"

View file

@ -31,41 +31,43 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
set(SOURCES
GlslangToSpv.cpp
InReadableOrder.cpp
Logger.cpp
SpvBuilder.cpp
SpvPostProcess.cpp
doc.cpp
SpvTools.cpp
disassemble.cpp
CInterface/spirv_c_interface.cpp)
set(SPIRV_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/GlslangToSpv.cpp
${CMAKE_CURRENT_SOURCE_DIR}/InReadableOrder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Logger.cpp
${CMAKE_CURRENT_SOURCE_DIR}/SpvBuilder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/SpvPostProcess.cpp
${CMAKE_CURRENT_SOURCE_DIR}/doc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/SpvTools.cpp
${CMAKE_CURRENT_SOURCE_DIR}/disassemble.cpp
${CMAKE_CURRENT_SOURCE_DIR}/CInterface/spirv_c_interface.cpp
PARENT_SCOPE)
set(SPVREMAP_SOURCES
SPVRemapper.cpp
doc.cpp)
set(HEADERS
bitutils.h
spirv.hpp
GLSL.std.450.h
GLSL.ext.EXT.h
GLSL.ext.KHR.h
GlslangToSpv.h
hex_float.h
Logger.h
SpvBuilder.h
spvIR.h
doc.h
SpvTools.h
disassemble.h
GLSL.ext.AMD.h
GLSL.ext.NV.h
GLSL.ext.ARM.h
GLSL.ext.QCOM.h
NonSemanticDebugPrintf.h
NonSemanticShaderDebugInfo100.h)
set(SPIRV_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/bitutils.h
${CMAKE_CURRENT_SOURCE_DIR}/spirv.hpp
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.std.450.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.EXT.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.KHR.h
${CMAKE_CURRENT_SOURCE_DIR}/GlslangToSpv.h
${CMAKE_CURRENT_SOURCE_DIR}/hex_float.h
${CMAKE_CURRENT_SOURCE_DIR}/Logger.h
${CMAKE_CURRENT_SOURCE_DIR}/SpvBuilder.h
${CMAKE_CURRENT_SOURCE_DIR}/spvIR.h
${CMAKE_CURRENT_SOURCE_DIR}/doc.h
${CMAKE_CURRENT_SOURCE_DIR}/SpvTools.h
${CMAKE_CURRENT_SOURCE_DIR}/disassemble.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.AMD.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.NV.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.ARM.h
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.ext.QCOM.h
${CMAKE_CURRENT_SOURCE_DIR}/NonSemanticDebugPrintf.h
${CMAKE_CURRENT_SOURCE_DIR}/NonSemanticShaderDebugInfo100.h
PARENT_SCOPE)
set(SPVREMAP_HEADERS
SPVRemapper.h
@ -76,9 +78,10 @@ set(PUBLIC_HEADERS
disassemble.h
Logger.h
spirv.hpp
SPVRemapper.h)
SPVRemapper.h
SpvTools.h)
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
add_library(SPIRV ${LIB_TYPE} ${CMAKE_CURRENT_SOURCE_DIR}/../glslang/stub.cpp)
add_library(glslang::SPIRV ALIAS SPIRV)
set_target_properties(SPIRV PROPERTIES
FOLDER glslang
@ -89,8 +92,6 @@ target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
glslang_add_build_info_dependency(SPIRV)
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
add_library(glslang::SPVRemapper ALIAS SPVRemapper)
@ -99,6 +100,7 @@ if (ENABLE_SPVREMAPPER)
POSITION_INDEPENDENT_CODE ON
VERSION "${GLSLANG_VERSION}"
SOVERSION "${GLSLANG_VERSION_MAJOR}")
glslang_only_export_explicit_symbols(SPVRemapper)
endif()
if(WIN32 AND BUILD_SHARED_LIBS)
@ -109,11 +111,11 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()
if(ENABLE_OPT)
target_link_libraries(SPIRV PRIVATE MachineIndependent PUBLIC SPIRV-Tools-opt)
target_link_libraries(SPIRV PRIVATE glslang PUBLIC SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
target_link_libraries(SPIRV PRIVATE glslang)
endif()
if(WIN32)

77
SPIRV/GlslangToSpv.cpp Executable file → Normal file
View file

@ -1558,7 +1558,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
else {
builder.setEmitSpirvDebugInfo();
}
builder.setDebugSourceFile(glslangIntermediate->getSourceFile());
builder.setDebugMainSourceFile(glslangIntermediate->getSourceFile());
// Set the source shader's text. If for SPV version 1.0, include
// a preamble in comments stating the OpModuleProcessed instructions.
@ -2858,9 +2858,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// SPIR-V, for an out parameter
std::vector<spv::Id> temporaryLvalues; // temporaries to pass, as proxies for complexLValues
auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ?
invertedType :
convertGlslangToSpvType(node->getType()); };
auto resultType = [&invertedType, &node, this](){
if (invertedType != spv::NoType) {
return invertedType;
} else {
auto ret = convertGlslangToSpvType(node->getType());
// convertGlslangToSpvType may clobber the debug location, reset it
builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename());
return ret;
}
};
// try texturing
result = createImageTextureFunctionCall(node);
@ -2917,8 +2924,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
return false;
} else {
if (node->getOp() == glslang::EOpScope)
builder.enterLexicalBlock(0);
if (node->getOp() == glslang::EOpScope) {
auto loc = node->getLoc();
builder.enterLexicalBlock(loc.line, loc.column);
}
}
} else {
if (sequenceDepth > 1 && node->getOp() == glslang::EOpScope)
@ -2967,6 +2976,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
currentFunction->setDebugLineInfo(sourceFileId, loc.line, loc.column);
}
} else {
if (options.generateDebugInfo) {
if (glslangIntermediate->getSource() == glslang::EShSourceGlsl && node->getSequence().size() > 1) {
auto endLoc = node->getSequence()[1]->getAsAggregate()->getEndLoc();
builder.setDebugSourceLocation(endLoc.line, endLoc.getFilename());
}
}
if (inEntryPoint)
entryPointTerminated = true;
builder.leaveFunction();
@ -4120,7 +4135,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
if (codeSegments[s])
codeSegments[s]->traverse(this);
else
builder.addSwitchBreak();
builder.addSwitchBreak(true);
}
breakForLoop.pop();
@ -4144,7 +4159,7 @@ void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* n
bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node)
{
auto blocks = builder.makeNewLoop();
builder.createBranch(&blocks.head);
builder.createBranch(true, &blocks.head);
// Loop control:
std::vector<unsigned int> operands;
@ -4161,7 +4176,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, operands);
if (node->testFirst() && node->getTest()) {
spv::Block& test = builder.makeNewBlock();
builder.createBranch(&test);
builder.createBranch(true, &test);
builder.setBuildPoint(&test);
node->getTest()->traverse(this);
@ -4172,22 +4187,22 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
breakForLoop.push(true);
if (node->getBody())
node->getBody()->traverse(this);
builder.createBranch(&blocks.continue_target);
builder.createBranch(true, &blocks.continue_target);
breakForLoop.pop();
builder.setBuildPoint(&blocks.continue_target);
if (node->getTerminal())
node->getTerminal()->traverse(this);
builder.createBranch(&blocks.head);
builder.createBranch(true, &blocks.head);
} else {
builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename());
builder.createBranch(&blocks.body);
builder.createBranch(true, &blocks.body);
breakForLoop.push(true);
builder.setBuildPoint(&blocks.body);
if (node->getBody())
node->getBody()->traverse(this);
builder.createBranch(&blocks.continue_target);
builder.createBranch(true, &blocks.continue_target);
breakForLoop.pop();
builder.setBuildPoint(&blocks.continue_target);
@ -4202,7 +4217,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
// TODO: unless there was a break/return/discard instruction
// somewhere in the body, this is an infinite loop, so we should
// issue a warning.
builder.createBranch(&blocks.head);
builder.createBranch(true, &blocks.head);
}
}
builder.setBuildPoint(&blocks.merge);
@ -4238,7 +4253,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
if (breakForLoop.top())
builder.createLoopExit();
else
builder.addSwitchBreak();
builder.addSwitchBreak(false);
break;
case glslang::EOpContinue:
builder.createLoopContinue();
@ -4372,7 +4387,14 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
initializer = builder.makeNullConstant(spvType);
}
return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false);
spv::Id var = builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false);
std::vector<spv::Decoration> topLevelDecorations;
glslang::TQualifier typeQualifier = node->getType().getQualifier();
TranslateMemoryDecoration(typeQualifier, topLevelDecorations, glslangIntermediate->usingVulkanMemoryModel());
for (auto deco : topLevelDecorations) {
builder.addDecoration(var, deco);
}
return var;
}
// Return type Id of the sampled type.
@ -4861,7 +4883,7 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member)
}
return false;
};
}
// Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id.
// explicitLayout can be kept the same throughout the hierarchical recursive walk.
@ -5404,6 +5426,8 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType
memberAlignment = componentAlignment;
// Don't add unnecessary padding after this member
// (undo std140 bumping size to a mutliple of vec4)
if (explicitLayout == glslang::ElpStd140) {
if (memberType.isMatrix()) {
if (matrixLayout == glslang::ElmRowMajor)
memberSize -= componentSize * (4 - memberType.getMatrixCols());
@ -5412,6 +5436,7 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType
} else if (memberType.isArray())
memberSize -= componentSize * (4 - memberType.getVectorSize());
}
}
// Bump up to member alignment
glslang::RoundToPow2(currentOffset, memberAlignment);
@ -5518,10 +5543,14 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate();
if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction)
continue;
builder.setDebugSourceLocation(glslFunction->getLoc().line, glslFunction->getLoc().getFilename());
if (isShaderEntryPoint(glslFunction)) {
// For HLSL, the entry function is actually a compiler generated function to resolve the difference of
// entry function signature between HLSL and SPIR-V. So we don't emit debug information for that.
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl) {
builder.setupDebugFunctionEntry(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(),
glslFunction->getLoc().line,
builder.setupFunctionDebugInfo(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(),
std::vector<spv::Id>(), // main function has no param
std::vector<char const*>());
}
@ -5576,8 +5605,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()),
glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes,
paramDecorations, &functionBlock);
builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line,
paramTypes, paramNames);
builder.setupFunctionDebugInfo(function, glslFunction->getName().c_str(), paramTypes, paramNames);
if (implicitThis)
function->setImplicitThis();
@ -6441,6 +6469,9 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
}
}
// Reset source location to the function call location after argument evaluation
builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename());
// 2. Allocate space for anything needing a copy, and if it's "in" or "inout"
// copy the original into that space.
//
@ -10280,7 +10311,7 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name)
}
}
}; // end anonymous namespace
} // end anonymous namespace
namespace glslang {
@ -10417,4 +10448,4 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>&
GetThreadPoolAllocator().pop();
}
}; // end namespace glslang
} // end namespace glslang

View file

@ -39,6 +39,7 @@
#include <vector>
#include "Logger.h"
#include "glslang/Include/visibility.h"
namespace glslang {
class TIntermediate;
@ -53,15 +54,16 @@ struct SpvOptions {
bool emitNonSemanticShaderDebugInfo {false};
bool emitNonSemanticShaderDebugSource{ false };
bool compileOnly{false};
bool optimizerAllowExpandedIDBound{false};
};
void GetSpirvVersion(std::string&);
int GetSpirvGeneratorVersion();
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void GetSpirvVersion(std::string&);
GLSLANG_EXPORT int GetSpirvGeneratorVersion();
GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
SpvOptions* options = nullptr);
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger* logger, SpvOptions* options = nullptr);
bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
GLSLANG_EXPORT bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
GLSLANG_EXPORT bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
}

View file

@ -37,12 +37,13 @@
#include <string>
#include <vector>
#include "glslang/Include/visibility.h"
namespace spv {
// A class for holding all SPIR-V build status messages, including
// missing/TBD functionalities, warnings, and errors.
class SpvBuildLogger {
class GLSLANG_EXPORT SpvBuildLogger {
public:
SpvBuildLogger() {}

View file

@ -38,7 +38,6 @@
#include <algorithm>
#include <cassert>
#include "../glslang/Include/Common.h"
namespace spv {

View file

@ -41,6 +41,21 @@
#include <cstdlib>
#include <exception>
#ifdef GLSLANG_IS_SHARED_LIBRARY
#ifdef _WIN32
#ifdef GLSLANG_EXPORTING
#define GLSLANG_EXPORT __declspec(dllexport)
#else
#define GLSLANG_EXPORT __declspec(dllimport)
#endif
#elif __GNUC__ >= 4
#define GLSLANG_EXPORT __attribute__((visibility("default")))
#endif
#endif // GLSLANG_IS_SHARED_LIBRARY
#ifndef GLSLANG_EXPORT
#define GLSLANG_EXPORT
#endif
namespace spv {
class spirvbin_base_t
@ -79,10 +94,11 @@ public:
#include "spirv.hpp"
namespace spv {
const Id NoResult = 0;
static inline constexpr Id NoResult = 0;
// class to hold SPIR-V binary data for remapping, DCE, and debug stripping
class spirvbin_t : public spirvbin_base_t
class GLSLANG_EXPORT spirvbin_t : public spirvbin_base_t
{
public:
spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose), errorLatch(false)

View file

@ -439,6 +439,43 @@ Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id col
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
if (emitNonSemanticShaderDebugInfo)
{
// Find a name for one of the parameters. It can either come from debuginfo for another
// type, or an OpName from a constant.
auto const findName = [&](Id id) {
Id id2 = debugId[id];
for (auto &t : groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic]) {
if (t->getResultId() == id2) {
for (auto &s : strings) {
if (s->getResultId() == t->getIdOperand(2)) {
return s->getNameString();
}
}
}
}
for (auto &t : names) {
if (t->getIdOperand(0) == id) {
return t->getNameString();
}
}
return "unknown";
};
std::string debugName = "coopmat<";
debugName += std::string(findName(component)) + ", ";
if (isConstantScalar(scope)) {
debugName += std::string("gl_Scope") + std::string(spv::ScopeToString((spv::Scope)getConstantScalar(scope))) + ", ";
} else {
debugName += std::string(findName(scope)) + ", ";
}
debugName += std::string(findName(rows)) + ", ";
debugName += std::string(findName(cols)) + ">";
// There's no nonsemantic debug info instruction for cooperative matrix types,
// use opaque composite instead.
auto const debugResultId = makeCompositeDebugType({}, debugName.c_str(), NonSemanticShaderDebugInfo100Structure, true);
debugId[type->getResultId()] = debugResultId;
}
return type->getResultId();
}
@ -1312,7 +1349,7 @@ Op Builder::getMostBasicTypeClass(Id typeId) const
}
}
int Builder::getNumTypeConstituents(Id typeId) const
unsigned int Builder::getNumTypeConstituents(Id typeId) const
{
Instruction* instr = module.getInstruction(typeId);
@ -1979,7 +2016,7 @@ void Builder::addDecoration(Id id, Decoration decoration, int num)
if (num >= 0)
dec->addImmediateOperand(num);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecoration(Id id, Decoration decoration, const char* s)
@ -1993,7 +2030,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s)
dec->addImmediateOperand(decoration);
dec->addStringOperand(s);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsigned>& literals)
@ -2008,7 +2045,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsi
for (auto literal : literals)
dec->addImmediateOperand(literal);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& strings)
@ -2023,7 +2060,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector<cons
for (auto string : strings)
dec->addStringOperand(string);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) {
@ -2034,7 +2071,7 @@ void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType lin
dec->addStringOperand(name);
dec->addImmediateOperand(linkType);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
@ -2048,7 +2085,7 @@ void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
dec->addImmediateOperand(decoration);
dec->addIdOperand(idDecoration);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecorationId(Id id, Decoration decoration, const std::vector<Id>& operandIds)
@ -2064,7 +2101,7 @@ void Builder::addDecorationId(Id id, Decoration decoration, const std::vector<Id
for (auto operandId : operandIds)
dec->addIdOperand(operandId);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
@ -2080,7 +2117,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
if (num >= 0)
dec->addImmediateOperand(num);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const char *s)
@ -2095,7 +2132,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
dec->addImmediateOperand(decoration);
dec->addStringOperand(s);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<unsigned>& literals)
@ -2111,7 +2148,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
for (auto literal : literals)
dec->addImmediateOperand(literal);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& strings)
@ -2127,10 +2164,16 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
for (auto string : strings)
dec->addStringOperand(string);
decorations.push_back(std::unique_ptr<Instruction>(dec));
decorations.insert(std::unique_ptr<Instruction>(dec));
}
void Builder::addInstruction(std::unique_ptr<Instruction> inst) {
// Phis must appear first in their block, don't insert line tracking instructions
// in front of them, just add the OpPhi and return.
if (inst->getOpCode() == OpPhi) {
buildPoint->addInstruction(std::move(inst));
return;
}
// Optionally insert OpDebugScope
if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) {
if (buildPoint->updateDebugScope(currentDebugScopeId.top())) {
@ -2176,6 +2219,10 @@ void Builder::addInstruction(std::unique_ptr<Instruction> inst) {
buildPoint->addInstruction(std::move(inst));
}
void Builder::addInstructionNoDebugInfo(std::unique_ptr<Instruction> inst) {
buildPoint->addInstruction(std::move(inst));
}
// Comments in header
Function* Builder::makeEntryPoint(const char* entryPoint)
{
@ -2236,14 +2283,13 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const
return function;
}
void Builder::setupDebugFunctionEntry(Function* function, const char* name, int line, const std::vector<Id>& paramTypes,
void Builder::setupFunctionDebugInfo(Function* function, const char* name, const std::vector<Id>& paramTypes,
const std::vector<char const*>& paramNames)
{
if (!emitNonSemanticShaderDebugInfo)
return;
currentLine = line;
Id nameId = getStringId(unmangleFunctionName(name));
Id funcTypeId = function->getFuncTypeId();
assert(debugId[funcTypeId] != 0);
@ -2315,7 +2361,7 @@ Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id
return funcId;
}
Id Builder::makeDebugLexicalBlock(uint32_t line) {
Id Builder::makeDebugLexicalBlock(uint32_t line, uint32_t column) {
assert(!currentDebugScopeId.empty());
Id lexId = getUniqueId();
@ -2325,7 +2371,7 @@ Id Builder::makeDebugLexicalBlock(uint32_t line) {
lex->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLexicalBlock);
lex->addIdOperand(makeDebugSource(currentFileId));
lex->addIdOperand(makeUintConstant(line));
lex->addIdOperand(makeUintConstant(0)); // column
lex->addIdOperand(makeUintConstant(column)); // column
lex->addIdOperand(currentDebugScopeId.top()); // scope
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(lex));
module.mapInstruction(lex);
@ -2358,10 +2404,14 @@ void Builder::makeReturn(bool implicit, Id retVal)
}
// Comments in header
void Builder::enterLexicalBlock(uint32_t line)
void Builder::enterLexicalBlock(uint32_t line, uint32_t column)
{
if (!emitNonSemanticShaderDebugInfo) {
return;
}
// Generate new lexical scope debug instruction
Id lexId = makeDebugLexicalBlock(line);
Id lexId = makeDebugLexicalBlock(line, column);
currentDebugScopeId.push(lexId);
dirtyScopeTracker = true;
}
@ -2369,6 +2419,10 @@ void Builder::enterLexicalBlock(uint32_t line)
// Comments in header
void Builder::leaveLexicalBlock()
{
if (!emitNonSemanticShaderDebugInfo) {
return;
}
// Pop current scope from stack and clear current scope
currentDebugScopeId.pop();
dirtyScopeTracker = true;
@ -2924,7 +2978,7 @@ Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vect
swizzle->reserveOperands(2);
swizzle->addIdOperand(target);
assert(getNumComponents(source) == (int)channels.size());
assert(getNumComponents(source) == channels.size());
assert(isVector(source));
swizzle->addIdOperand(source);
@ -3371,7 +3425,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
Id Builder::createCompositeConstruct(Id typeId, const std::vector<Id>& constituents)
{
assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 &&
getNumTypeConstituents(typeId) == (int)constituents.size()));
getNumTypeConstituents(typeId) == constituents.size()));
if (generatingOpCodeForSpecConst) {
// Sometime, even in spec-constant-op mode, the constant composite to be
@ -3424,6 +3478,12 @@ Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sourc
if (sources.size() == 1 && isScalar(sources[0]) && numTargetComponents > 1)
return smearScalar(precision, sources[0], resultTypeId);
// Special case: 2 vectors of equal size
if (sources.size() == 1 && isVector(sources[0]) && numTargetComponents == getNumComponents(sources[0])) {
assert(resultTypeId == getTypeId(sources[0]));
return sources[0];
}
// accumulate the arguments for OpCompositeConstruct
std::vector<Id> constituents;
Id scalarTypeId = getScalarTypeId(resultTypeId);
@ -3458,8 +3518,8 @@ Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sourc
if (sourcesToUse + targetComponent > numTargetComponents)
sourcesToUse = numTargetComponents - targetComponent;
int col = 0;
int row = 0;
unsigned int col = 0;
unsigned int row = 0;
for (unsigned int s = 0; s < sourcesToUse; ++s) {
if (row >= getNumRows(sourceArg)) {
row = 0;
@ -3504,8 +3564,8 @@ Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sourc
Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId)
{
Id componentTypeId = getScalarTypeId(resultTypeId);
int numCols = getTypeNumColumns(resultTypeId);
int numRows = getTypeNumRows(resultTypeId);
unsigned int numCols = getTypeNumColumns(resultTypeId);
unsigned int numRows = getTypeNumRows(resultTypeId);
Instruction* instr = module.getInstruction(componentTypeId);
const unsigned bitCount = instr->getImmediateOperand(0);
@ -3520,11 +3580,11 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
Id sourceColumnTypeId = getContainedTypeId(getTypeId(matrix));
std::vector<unsigned> channels;
for (int row = 0; row < numRows; ++row)
for (unsigned int row = 0; row < numRows; ++row)
channels.push_back(row);
std::vector<Id> matrixColumns;
for (int col = 0; col < numCols; ++col) {
for (unsigned int col = 0; col < numCols; ++col) {
std::vector<unsigned> indexes;
indexes.push_back(col);
Id colv = createCompositeExtract(matrix, sourceColumnTypeId, indexes);
@ -3542,7 +3602,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
// Detect a matrix being constructed from a repeated vector of the correct size.
// Create the composite directly from it.
if ((int)sources.size() == numCols && isVector(sources[0]) && getNumComponents(sources[0]) == numRows &&
if (sources.size() == numCols && isVector(sources[0]) && getNumComponents(sources[0]) == numRows &&
std::equal(sources.begin() + 1, sources.end(), sources.begin())) {
return setPrecision(createCompositeConstruct(resultTypeId, sources), precision);
}
@ -3574,12 +3634,12 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
} else if (isMatrix(sources[0])) {
// constructing from another matrix; copy over the parts that exist in both the argument and constructee
Id matrix = sources[0];
int minCols = std::min(numCols, getNumColumns(matrix));
int minRows = std::min(numRows, getNumRows(matrix));
for (int col = 0; col < minCols; ++col) {
unsigned int minCols = std::min(numCols, getNumColumns(matrix));
unsigned int minRows = std::min(numRows, getNumRows(matrix));
for (unsigned int col = 0; col < minCols; ++col) {
std::vector<unsigned> indexes;
indexes.push_back(col);
for (int row = 0; row < minRows; ++row) {
for (unsigned int row = 0; row < minRows; ++row) {
indexes.push_back(row);
ids[col][row] = createCompositeExtract(matrix, componentTypeId, indexes);
indexes.pop_back();
@ -3588,12 +3648,12 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
}
} else {
// fill in the matrix in column-major order with whatever argument components are available
int row = 0;
int col = 0;
unsigned int row = 0;
unsigned int col = 0;
for (int arg = 0; arg < (int)sources.size() && col < numCols; ++arg) {
for (unsigned int arg = 0; arg < sources.size() && col < numCols; ++arg) {
Id argComp = sources[arg];
for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
for (unsigned int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
if (getNumComponents(sources[arg]) > 1) {
argComp = createCompositeExtract(sources[arg], componentTypeId, comp);
setPrecision(argComp, precision);
@ -3617,9 +3677,9 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
// make the column vectors
Id columnTypeId = getContainedTypeId(resultTypeId);
std::vector<Id> matrixColumns;
for (int col = 0; col < numCols; ++col) {
for (unsigned int col = 0; col < numCols; ++col) {
std::vector<Id> vectorComponents;
for (int row = 0; row < numRows; ++row)
for (unsigned int row = 0; row < numRows; ++row)
vectorComponents.push_back(ids[col][row]);
Id column = createCompositeConstruct(columnTypeId, vectorComponents);
setPrecision(column, precision);
@ -3648,6 +3708,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) :
// Save the current block, so that we can add in the flow control split when
// makeEndIf is called.
headerBlock = builder.getBuildPoint();
builder.createSelectionMerge(mergeBlock, control);
function->addBlock(thenBlock);
builder.setBuildPoint(thenBlock);
@ -3657,7 +3718,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) :
void Builder::If::makeBeginElse()
{
// Close out the "then" by having it jump to the mergeBlock
builder.createBranch(mergeBlock);
builder.createBranch(true, mergeBlock);
// Make the first else block and add it to the function
elseBlock = new Block(builder.getUniqueId(), *function);
@ -3671,11 +3732,10 @@ void Builder::If::makeBeginElse()
void Builder::If::makeEndIf()
{
// jump to the merge block
builder.createBranch(mergeBlock);
builder.createBranch(true, mergeBlock);
// Go back to the headerBlock and make the flow control split
builder.setBuildPoint(headerBlock);
builder.createSelectionMerge(mergeBlock, control);
if (elseBlock)
builder.createConditionalBranch(condition, thenBlock, elseBlock);
else
@ -3721,10 +3781,10 @@ void Builder::makeSwitch(Id selector, unsigned int control, int numSegments, con
}
// Comments in header
void Builder::addSwitchBreak()
void Builder::addSwitchBreak(bool implicit)
{
// branch to the top of the merge block stack
createBranch(switchMerges.top());
createBranch(implicit, switchMerges.top());
createAndSetNoPredecessorBlock("post-switch-break");
}
@ -3735,7 +3795,7 @@ void Builder::nextSwitchSegment(std::vector<Block*>& segmentBlock, int nextSegme
if (lastSegment >= 0) {
// Close out previous segment by jumping, if necessary, to next segment
if (! buildPoint->isTerminated())
createBranch(segmentBlock[nextSegment]);
createBranch(true, segmentBlock[nextSegment]);
}
Block* block = segmentBlock[nextSegment];
block->getParent().addBlock(block);
@ -3747,7 +3807,7 @@ void Builder::endSwitch(std::vector<Block*>& /*segmentBlock*/)
{
// Close out previous segment by jumping, if necessary, to next segment
if (! buildPoint->isTerminated())
addSwitchBreak();
addSwitchBreak(true);
switchMerges.top()->getParent().addBlock(switchMerges.top());
setBuildPoint(switchMerges.top());
@ -3780,14 +3840,14 @@ Builder::LoopBlocks& Builder::makeNewLoop()
void Builder::createLoopContinue()
{
createBranch(&loops.top().continue_target);
createBranch(false, &loops.top().continue_target);
// Set up a block for dead code.
createAndSetNoPredecessorBlock("post-loop-continue");
}
void Builder::createLoopExit()
{
createBranch(&loops.top().merge);
createBranch(false, &loops.top().merge);
// Set up a block for dead code.
createAndSetNoPredecessorBlock("post-loop-break");
}
@ -3846,7 +3906,7 @@ void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAcce
// If a swizzle exists and is not full and is not dynamic, then the swizzle will be broken into individual stores.
if (accessChain.swizzle.size() > 0 &&
getNumTypeComponents(getResultingAccessChainType()) != (int)accessChain.swizzle.size() &&
getNumTypeComponents(getResultingAccessChainType()) != accessChain.swizzle.size() &&
accessChain.component == NoResult) {
for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) {
accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle[i]));
@ -4166,7 +4226,7 @@ void Builder::simplifyAccessChainSwizzle()
{
// If the swizzle has fewer components than the vector, it is subsetting, and must stay
// to preserve that fact.
if (getNumTypeComponents(accessChain.preSwizzleBaseType) > (int)accessChain.swizzle.size())
if (getNumTypeComponents(accessChain.preSwizzleBaseType) > accessChain.swizzle.size())
return;
// if components are out of order, it is a swizzle
@ -4229,11 +4289,16 @@ void Builder::createAndSetNoPredecessorBlock(const char* /*name*/)
}
// Comments in header
void Builder::createBranch(Block* block)
void Builder::createBranch(bool implicit, Block* block)
{
Instruction* branch = new Instruction(OpBranch);
branch->addIdOperand(block->getId());
if (implicit) {
addInstructionNoDebugInfo(std::unique_ptr<Instruction>(branch));
}
else {
addInstruction(std::unique_ptr<Instruction>(branch));
}
block->addPredecessor(buildPoint);
}
@ -4266,7 +4331,10 @@ void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* els
branch->addIdOperand(condition);
branch->addIdOperand(thenBlock->getId());
branch->addIdOperand(elseBlock->getId());
addInstruction(std::unique_ptr<Instruction>(branch));
// A conditional branch is always attached to a condition expression
addInstructionNoDebugInfo(std::unique_ptr<Instruction>(branch));
thenBlock->addPredecessor(buildPoint);
elseBlock->addPredecessor(buildPoint);
}
@ -4324,11 +4392,10 @@ void Builder::dumpSourceInstructions(std::vector<unsigned int>& out) const
dumpSourceInstructions(iItr->first, *iItr->second, out);
}
void Builder::dumpInstructions(std::vector<unsigned int>& out,
const std::vector<std::unique_ptr<Instruction> >& instructions) const
template <class Range> void Builder::dumpInstructions(std::vector<unsigned int>& out, const Range& instructions) const
{
for (int i = 0; i < (int)instructions.size(); ++i) {
instructions[i]->dump(out);
for (const auto& inst : instructions) {
inst->dump(out);
}
}
@ -4341,4 +4408,40 @@ void Builder::dumpModuleProcesses(std::vector<unsigned int>& out) const
}
}
bool Builder::DecorationInstructionLessThan::operator()(const std::unique_ptr<Instruction>& lhs,
const std::unique_ptr<Instruction>& rhs) const
{
// Order by the id to which the decoration applies first. This is more intuitive.
assert(lhs->isIdOperand(0) && rhs->isIdOperand(0));
if (lhs->getIdOperand(0) != rhs->getIdOperand(0)) {
return lhs->getIdOperand(0) < rhs->getIdOperand(0);
}
if (lhs->getOpCode() != rhs->getOpCode())
return lhs->getOpCode() < rhs->getOpCode();
// Now compare the operands.
int minSize = std::min(lhs->getNumOperands(), rhs->getNumOperands());
for (int i = 1; i < minSize; ++i) {
if (lhs->isIdOperand(i) != rhs->isIdOperand(i)) {
return lhs->isIdOperand(i) < rhs->isIdOperand(i);
}
if (lhs->isIdOperand(i)) {
if (lhs->getIdOperand(i) != rhs->getIdOperand(i)) {
return lhs->getIdOperand(i) < rhs->getIdOperand(i);
}
} else {
if (lhs->getImmediateOperand(i) != rhs->getImmediateOperand(i)) {
return lhs->getImmediateOperand(i) < rhs->getImmediateOperand(i);
}
}
}
if (lhs->getNumOperands() != rhs->getNumOperands())
return lhs->getNumOperands() < rhs->getNumOperands();
// In this case they are equal.
return false;
}
} // end spv namespace

View file

@ -48,6 +48,7 @@
#define SpvBuilder_H
#include "Logger.h"
#define SPV_ENABLE_UTILITY_CODE
#include "spirv.hpp"
#include "spvIR.h"
namespace spv {
@ -56,6 +57,7 @@ namespace spv {
}
#include <algorithm>
#include <cstdint>
#include <map>
#include <memory>
#include <set>
@ -107,7 +109,7 @@ public:
spv::Id getMainFileId() const { return mainFileId; }
// Initialize the main source file name
void setDebugSourceFile(const std::string& file)
void setDebugMainSourceFile(const std::string& file)
{
if (trackDebugInfo) {
dirtyLineTracker = true;
@ -245,10 +247,13 @@ public:
Id makeDebugValue(Id const debugLocalVariable, Id const value);
Id makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTypes);
Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId);
Id makeDebugLexicalBlock(uint32_t line);
Id makeDebugLexicalBlock(uint32_t line, uint32_t column);
std::string unmangleFunctionName(std::string const& name) const;
void setupDebugFunctionEntry(Function* function, const char* name, int line,
const std::vector<Id>& paramTypes,
// Initialize non-semantic debug information for a function, including those of:
// - The function definition
// - The function parameters
void setupFunctionDebugInfo(Function* function, const char* name, const std::vector<Id>& paramTypes,
const std::vector<char const*>& paramNames);
// accelerationStructureNV type
@ -264,9 +269,9 @@ public:
Op getOpCode(Id id) const { return module.getInstruction(id)->getOpCode(); }
Op getTypeClass(Id typeId) const { return getOpCode(typeId); }
Op getMostBasicTypeClass(Id typeId) const;
int getNumComponents(Id resultId) const { return getNumTypeComponents(getTypeId(resultId)); }
int getNumTypeConstituents(Id typeId) const;
int getNumTypeComponents(Id typeId) const { return getNumTypeConstituents(typeId); }
unsigned int getNumComponents(Id resultId) const { return getNumTypeComponents(getTypeId(resultId)); }
unsigned int getNumTypeConstituents(Id typeId) const;
unsigned int getNumTypeComponents(Id typeId) const { return getNumTypeConstituents(typeId); }
Id getScalarTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId, int) const;
@ -334,18 +339,18 @@ public:
return module.getInstruction(scalarTypeId)->getImmediateOperand(0);
}
int getTypeNumColumns(Id typeId) const
unsigned int getTypeNumColumns(Id typeId) const
{
assert(isMatrixType(typeId));
return getNumTypeConstituents(typeId);
}
int getNumColumns(Id resultId) const { return getTypeNumColumns(getTypeId(resultId)); }
int getTypeNumRows(Id typeId) const
unsigned int getNumColumns(Id resultId) const { return getTypeNumColumns(getTypeId(resultId)); }
unsigned int getTypeNumRows(Id typeId) const
{
assert(isMatrixType(typeId));
return getNumTypeComponents(getContainedTypeId(typeId));
}
int getNumRows(Id resultId) const { return getTypeNumRows(getTypeId(resultId)); }
unsigned int getNumRows(Id resultId) const { return getTypeNumRows(getTypeId(resultId)); }
Dim getTypeDimensionality(Id typeId) const
{
@ -416,8 +421,7 @@ public:
// Also reset current last DebugScope and current source line to unknown
void setBuildPoint(Block* bp) {
buildPoint = bp;
// TODO: Technically, change of build point should set line tracker dirty. But we'll have bad line info for
// branch instructions. Commenting this for now because at least this matches the old behavior.
dirtyLineTracker = true;
dirtyScopeTracker = true;
}
Block* getBuildPoint() const { return buildPoint; }
@ -426,6 +430,11 @@ public:
// Optionally, additional debug info instructions may also be prepended.
void addInstruction(std::unique_ptr<Instruction> inst);
// Append an instruction to the end of the current build point without prepending any debug instructions.
// This is useful for insertion of some debug info instructions themselves or some control flow instructions
// that are attached to its predecessor instruction.
void addInstructionNoDebugInfo(std::unique_ptr<Instruction> inst);
// Make the entry-point function. The returned pointer is only valid
// for the lifetime of this builder.
Function* makeEntryPoint(const char*);
@ -442,7 +451,7 @@ public:
void makeReturn(bool implicit, Id retVal = 0);
// Initialize state and generate instructions for new lexical scope
void enterLexicalBlock(uint32_t line);
void enterLexicalBlock(uint32_t line, uint32_t column);
// Set state and generate instructions to exit current lexical scope
void leaveLexicalBlock();
@ -639,7 +648,7 @@ public:
const std::vector<int>& valueToSegment, int defaultSegment, std::vector<Block*>& segmentBB);
// Add a branch to the innermost switch's merge block.
void addSwitchBreak();
void addSwitchBreak(bool implicit);
// Move to the next code segment, passing in the return argument in makeSwitch()
void nextSwitchSegment(std::vector<Block*>& segmentBB, int segment);
@ -861,7 +870,9 @@ public:
void dump(std::vector<unsigned int>&) const;
void createBranch(Block* block);
// Add a branch to the target block.
// If set implicit, the branch instruction shouldn't have debug source location.
void createBranch(bool implicit, Block* block);
void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock);
void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control,
const std::vector<unsigned int>& operands);
@ -890,10 +901,13 @@ public:
void createSelectionMerge(Block* mergeBlock, unsigned int control);
void dumpSourceInstructions(std::vector<unsigned int>&) const;
void dumpSourceInstructions(const spv::Id fileId, const std::string& text, std::vector<unsigned int>&) const;
void dumpInstructions(std::vector<unsigned int>&, const std::vector<std::unique_ptr<Instruction> >&) const;
template <class Range> void dumpInstructions(std::vector<unsigned int>& out, const Range& instructions) const;
void dumpModuleProcesses(std::vector<unsigned int>&) const;
spv::MemoryAccessMask sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc)
const;
struct DecorationInstructionLessThan {
bool operator()(const std::unique_ptr<Instruction>& lhs, const std::unique_ptr<Instruction>& rhs) const;
};
unsigned int spvVersion; // the version of SPIR-V to emit in the header
SourceLanguage sourceLang;
@ -950,7 +964,7 @@ public:
std::vector<std::unique_ptr<Instruction> > entryPoints;
std::vector<std::unique_ptr<Instruction> > executionModes;
std::vector<std::unique_ptr<Instruction> > names;
std::vector<std::unique_ptr<Instruction> > decorations;
std::set<std::unique_ptr<Instruction>, DecorationInstructionLessThan> decorations;
std::vector<std::unique_ptr<Instruction> > constantsTypesGlobals;
std::vector<std::unique_ptr<Instruction> > externals;
std::vector<std::unique_ptr<Function> > functions;
@ -990,6 +1004,6 @@ public:
SpvBuildLogger* logger;
}; // end Builder class
}; // end spv namespace
} // end spv namespace
#endif // SpvBuilder_H

View file

@ -387,12 +387,14 @@ void Builder::postProcessCFG()
}
// Remove unneeded decorations, for unreachable instructions
decorations.erase(std::remove_if(decorations.begin(), decorations.end(),
[&unreachableDefinitions](std::unique_ptr<Instruction>& I) -> bool {
Id decoration_id = I.get()->getIdOperand(0);
return unreachableDefinitions.count(decoration_id) != 0;
}),
decorations.end());
for (auto decorationIter = decorations.begin(); decorationIter != decorations.end();) {
Id decorationId = (*decorationIter)->getIdOperand(0);
if (unreachableDefinitions.count(decorationId) != 0) {
decorationIter = decorations.erase(decorationIter);
} else {
++decorationIter;
}
}
}
// comment in header
@ -546,4 +548,4 @@ void Builder::postProcess(bool compileOnly)
postProcessSamplers();
}
}; // end spv namespace
} // end spv namespace

View file

@ -44,6 +44,7 @@
#include "SpvTools.h"
#include "spirv-tools/optimizer.hpp"
#include "glslang/MachineIndependent/localintermediate.h"
namespace glslang {
@ -81,6 +82,11 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
}
spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger)
{
return MapToSpirvToolsEnv(intermediate.getSpv(), logger);
}
// Callback passed to spvtools::Optimizer::SetMessageConsumer
void OptimizerMesssageConsumer(spv_message_level_t level, const char *source,
const spv_position_t &position, const char *message)
@ -218,9 +224,20 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
spvtools::OptimizerOptions spvOptOptions;
if (options->optimizerAllowExpandedIDBound)
spvOptOptions.set_max_id_bound(0x3FFFFFFF);
optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
spvOptOptions.set_run_validator(false); // The validator may run as a separate step later on
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
if (options->optimizerAllowExpandedIDBound) {
if (spirv.size() > 3 && spirv[3] > kDefaultMaxIdBound) {
spvtools::Optimizer optimizer2(target_env);
optimizer2.SetMessageConsumer(OptimizerMesssageConsumer);
optimizer2.RegisterPass(spvtools::CreateCompactIdsPass());
optimizer2.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
}
}
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
@ -292,6 +309,6 @@ void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
}; // end namespace glslang
} // end namespace glslang
#endif

View file

@ -44,10 +44,12 @@
#if ENABLE_OPT
#include <vector>
#include <ostream>
#include <unordered_set>
#include "spirv-tools/libspirv.h"
#endif
#include "glslang/MachineIndependent/localintermediate.h"
#include "glslang/MachineIndependent/Versions.h"
#include "glslang/Include/visibility.h"
#include "GlslangToSpv.h"
#include "Logger.h"
@ -55,44 +57,49 @@ namespace glslang {
#if ENABLE_OPT
class TIntermediate;
// Translate glslang's view of target versioning to what SPIRV-Tools uses.
spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger);
// Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
// Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment.
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv,
spv_target_env requested_context);
// Apply the SPIRV-Tools validator to generated SPIR-V.
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*, bool prelegalization);
// Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process.
void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*, const SpvOptions*);
// Apply the SPIRV-Tools EliminateDeadInputComponents pass to generated SPIR-V. Put result in |spirv|.
void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*);
// Apply the SPIRV-Tools AnalyzeDeadOutputStores pass to generated SPIR-V. Put result in |live_locs|.
// Return true if the result is valid.
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger*);
// Apply the SPIRV-Tools EliminateDeadOutputStores and AggressiveDeadCodeElimination passes to generated SPIR-V using
// |live_locs|. Put result in |spirv|.
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
GLSLANG_EXPORT void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger*);
// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
// optimization is disabled.
void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
GLSLANG_EXPORT void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
std::vector<unsigned int>& spirv, spv::SpvBuildLogger*);
#endif

View file

@ -825,4 +825,4 @@ void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
SpirvStream.processInstructions();
}
}; // end namespace spv
} // end namespace spv

View file

@ -43,10 +43,12 @@
#include <iostream>
#include <vector>
#include "glslang/Include/visibility.h"
namespace spv {
// disassemble with glslang custom disassembler
void Disassemble(std::ostream& out, const std::vector<unsigned int>&);
GLSLANG_EXPORT void Disassemble(std::ostream& out, const std::vector<unsigned int>&);
} // end namespace spv

2
SPIRV/doc.cpp Executable file → Normal file
View file

@ -3491,4 +3491,4 @@ void Parameterize()
});
}
}; // end spv namespace
} // end spv namespace

View file

@ -385,7 +385,7 @@ enum ImageOperandsShift {
ImageOperandsMax = 0x7fffffff,
};
enum ImageOperandsMask {
enum ImageOperandsMask : unsigned {
ImageOperandsMaskNone = 0,
ImageOperandsBiasMask = 0x00000001,
ImageOperandsLodMask = 0x00000002,
@ -420,7 +420,7 @@ enum FPFastMathModeShift {
FPFastMathModeMax = 0x7fffffff,
};
enum FPFastMathModeMask {
enum FPFastMathModeMask : unsigned {
FPFastMathModeMaskNone = 0,
FPFastMathModeNotNaNMask = 0x00000001,
FPFastMathModeNotInfMask = 0x00000002,
@ -745,7 +745,7 @@ enum SelectionControlShift {
SelectionControlMax = 0x7fffffff,
};
enum SelectionControlMask {
enum SelectionControlMask : unsigned {
SelectionControlMaskNone = 0,
SelectionControlFlattenMask = 0x00000001,
SelectionControlDontFlattenMask = 0x00000002,
@ -774,7 +774,7 @@ enum LoopControlShift {
LoopControlMax = 0x7fffffff,
};
enum LoopControlMask {
enum LoopControlMask : unsigned {
LoopControlMaskNone = 0,
LoopControlUnrollMask = 0x00000001,
LoopControlDontUnrollMask = 0x00000002,
@ -806,7 +806,7 @@ enum FunctionControlShift {
FunctionControlMax = 0x7fffffff,
};
enum FunctionControlMask {
enum FunctionControlMask : unsigned {
FunctionControlMaskNone = 0,
FunctionControlInlineMask = 0x00000001,
FunctionControlDontInlineMask = 0x00000002,
@ -836,7 +836,7 @@ enum MemorySemanticsShift {
MemorySemanticsMax = 0x7fffffff,
};
enum MemorySemanticsMask {
enum MemorySemanticsMask : unsigned {
MemorySemanticsMaskNone = 0,
MemorySemanticsAcquireMask = 0x00000002,
MemorySemanticsReleaseMask = 0x00000004,
@ -872,7 +872,7 @@ enum MemoryAccessShift {
MemoryAccessMax = 0x7fffffff,
};
enum MemoryAccessMask {
enum MemoryAccessMask : unsigned {
MemoryAccessMaskNone = 0,
MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002,
@ -922,7 +922,7 @@ enum KernelProfilingInfoShift {
KernelProfilingInfoMax = 0x7fffffff,
};
enum KernelProfilingInfoMask {
enum KernelProfilingInfoMask : unsigned {
KernelProfilingInfoMaskNone = 0,
KernelProfilingInfoCmdExecTimeMask = 0x00000001,
};
@ -1194,7 +1194,7 @@ enum RayFlagsShift {
RayFlagsMax = 0x7fffffff,
};
enum RayFlagsMask {
enum RayFlagsMask : unsigned {
RayFlagsMaskNone = 0,
RayFlagsOpaqueKHRMask = 0x00000001,
RayFlagsNoOpaqueKHRMask = 0x00000002,
@ -1236,7 +1236,7 @@ enum FragmentShadingRateShift {
FragmentShadingRateMax = 0x7fffffff,
};
enum FragmentShadingRateMask {
enum FragmentShadingRateMask : unsigned {
FragmentShadingRateMaskNone = 0,
FragmentShadingRateVertical2PixelsMask = 0x00000001,
FragmentShadingRateVertical4PixelsMask = 0x00000002,
@ -1291,7 +1291,7 @@ enum CooperativeMatrixOperandsShift {
CooperativeMatrixOperandsMax = 0x7fffffff,
};
enum CooperativeMatrixOperandsMask {
enum CooperativeMatrixOperandsMask : unsigned {
CooperativeMatrixOperandsMaskNone = 0,
CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001,
CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002,
@ -2772,6 +2772,20 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
}
}
inline const char* ScopeToString(Scope value) {
switch (value) {
case ScopeCrossDevice: return "CrossDevice";
case ScopeDevice: return "Device";
case ScopeWorkgroup: return "Workgroup";
case ScopeSubgroup: return "Subgroup";
case ScopeInvocation: return "Invocation";
case ScopeQueueFamily: return "QueueFamily";
case ScopeShaderCallKHR: return "ShaderCallKHR";
default: return "Unknown";
}
}
#endif /* SPV_ENABLE_UTILITY_CODE */
// Overload bitwise operators for mask bit combining

View file

@ -189,6 +189,15 @@ public:
out.push_back(operands[op]);
}
const char *getNameString() const {
if (opCode == OpString) {
return (const char *)&operands[0];
} else {
assert(opCode == OpName);
return (const char *)&operands[1];
}
}
protected:
Instruction(const Instruction&);
Id resultId;

View file

@ -59,8 +59,6 @@ glslang_set_link_args(glslang-standalone)
set(LIBRARIES
glslang
OSDependent
SPIRV
glslang-default-resource-limits)
if(WIN32)
@ -75,6 +73,7 @@ target_link_libraries(glslang-standalone ${LIBRARIES})
target_include_directories(glslang-standalone PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
if(ENABLE_SPIRV)
if(ENABLE_SPVREMAPPER)
set(REMAPPER_SOURCES spirv-remap.cpp)
add_executable(spirv-remap ${REMAPPER_SOURCES})
@ -82,6 +81,7 @@ if(ENABLE_SPVREMAPPER)
glslang_set_link_args(spirv-remap)
target_link_libraries(spirv-remap SPVRemapper ${LIBRARIES})
endif()
endif()
if(WIN32)
source_group("Source" FILES ${SOURCES})
@ -93,20 +93,29 @@ set(link_method create_symlink)
if(WIN32 OR MINGW)
set(link_method copy_if_different)
endif()
add_custom_command(TARGET glslang-standalone
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E ${link_method} $<TARGET_FILE_NAME:glslang-standalone> ${legacy_glslang_name}
WORKING_DIRECTORY $<TARGET_FILE_DIR:glslang-standalone>)
add_custom_command(
TARGET glslang-standalone POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E "${link_method}" "\$<TARGET_FILE_NAME:glslang-standalone>" "${legacy_glslang_name}"
WORKING_DIRECTORY "\$<TARGET_FILE_DIR:glslang-standalone>"
VERBATIM
)
if(GLSLANG_ENABLE_INSTALL)
install(TARGETS glslang-standalone EXPORT glslang-targets)
# Create the same symlink at install time
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E ${link_method} $<TARGET_FILE_NAME:glslang-standalone> ${legacy_glslang_name} \
WORKING_DIRECTORY \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})")
install(CODE "\
message(STATUS \"Installing (${link_method}): \$<TARGET_FILE_NAME:glslang-standalone> -> \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}\")
execute_process(
COMMAND \"\${CMAKE_COMMAND}\" -E ${link_method} [=[\$<TARGET_FILE_NAME:glslang-standalone>]=] [=[${legacy_glslang_name}]=]
WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}\"
)
")
if(ENABLE_SPIRV)
if(ENABLE_SPVREMAPPER)
install(TARGETS spirv-remap EXPORT glslang-targets)
endif()
endif()
endif(GLSLANG_ENABLE_INSTALL)

View file

@ -44,12 +44,10 @@
#include "glslang/Public/ResourceLimits.h"
#include "Worklist.h"
#include "DirStackFileIncluder.h"
#include "./../glslang/Include/ShHandle.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../glslang/MachineIndependent/localintermediate.h"
#include "../SPIRV/GlslangToSpv.h"
#include "../SPIRV/GLSL.std.450.h"
#include "../SPIRV/doc.h"
#include "../SPIRV/disassemble.h"
#include <array>
@ -110,6 +108,8 @@ enum TOptions : uint64_t {
EOptionInvertY = (1ull << 30),
EOptionDumpBareVersion = (1ull << 31),
EOptionCompileOnly = (1ull << 32),
EOptionDisplayErrorColumn = (1ull << 33),
EOptionLinkTimeOptimization = (1ull << 34),
};
bool targetHlslFunctionality1 = false;
bool SpvToolsDisassembler = false;
@ -898,6 +898,10 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
Options |= EOptionDumpVersions;
} else if (lowerword == "no-link") {
Options |= EOptionCompileOnly;
} else if (lowerword == "error-column") {
Options |= EOptionDisplayErrorColumn;
} else if (lowerword == "lto") {
Options |= EOptionLinkTimeOptimization;
} else if (lowerword == "help") {
usage();
break;
@ -1082,6 +1086,10 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
if ((Options & EOptionDumpReflection) && !(Options & EOptionLinkProgram))
Error("reflection requires -l for linking");
// link time optimization makes no sense unless linking
if ((Options & EOptionLinkTimeOptimization) && !(Options & EOptionLinkProgram))
Error("link time optimization requires -l for linking");
// -o or -x makes no sense if there is no target binary
if (binaryFileName && (Options & EOptionSpv) == 0)
Error("no binary generation requested (e.g., -V)");
@ -1164,6 +1172,10 @@ void SetMessageOptions(EShMessages& messages)
messages = (EShMessages)(messages | EShMsgEnhanced);
if (AbsolutePath)
messages = (EShMessages)(messages | EShMsgAbsolutePath);
if (Options & EOptionDisplayErrorColumn)
messages = (EShMessages)(messages | EShMsgDisplayErrorColumn);
if (Options & EOptionLinkTimeOptimization)
messages = (EShMessages)(messages | EShMsgLinkTimeOptimization);
}
//
@ -1506,6 +1518,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
// Dump SPIR-V
if (Options & EOptionSpv) {
#ifdef ENABLE_SPIRV
CompileOrLinkFailed.fetch_or(CompileFailed);
CompileOrLinkFailed.fetch_or(LinkFailed);
if (static_cast<bool>(CompileOrLinkFailed.load()))
@ -1565,6 +1578,9 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
}
}
}
#else
Error("This configuration of glslang does not have SPIR-V support");
#endif
}
CompileOrLinkFailed.fetch_or(CompileFailed);
@ -1664,21 +1680,31 @@ int singleMain()
}
if (Options & EOptionDumpBareVersion) {
printf("%d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR,
int spirvGeneratorVersion = 0;
#ifdef ENABLE_SPIRV
spirvGeneratorVersion = glslang::GetSpirvGeneratorVersion();
#endif
printf("%d:%d.%d.%d%s\n", spirvGeneratorVersion, GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR,
GLSLANG_VERSION_PATCH, GLSLANG_VERSION_FLAVOR);
if (workList.empty())
return ESuccess;
} else if (Options & EOptionDumpVersions) {
printf("Glslang Version: %d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR,
int spirvGeneratorVersion = 0;
#ifdef ENABLE_SPIRV
spirvGeneratorVersion = glslang::GetSpirvGeneratorVersion();
#endif
printf("Glslang Version: %d:%d.%d.%d%s\n", spirvGeneratorVersion, GLSLANG_VERSION_MAJOR,
GLSLANG_VERSION_MINOR, GLSLANG_VERSION_PATCH, GLSLANG_VERSION_FLAVOR);
printf("ESSL Version: %s\n", glslang::GetEsslVersionString());
printf("GLSL Version: %s\n", glslang::GetGlslVersionString());
std::string spirvVersion;
#if ENABLE_SPIRV
glslang::GetSpirvVersion(spirvVersion);
#endif
printf("SPIR-V Version %s\n", spirvVersion.c_str());
printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId());
printf("SPIR-V Generator Version %d\n", glslang::GetSpirvGeneratorVersion());
printf("SPIR-V Generator Version %d\n", spirvGeneratorVersion);
printf("GL_KHR_vulkan_glsl version %d\n", 100);
printf("ARB_GL_gl_spirv version %d\n", 100);
if (workList.empty())
@ -2024,6 +2050,7 @@ void usage()
" shaders compatible with DirectX\n"
" --invert-y | --iy invert position.Y output in vertex shader\n"
" --enhanced-msgs print more readable error messages (GLSL only)\n"
" --error-column display the column of the error along the line\n"
" --keep-uncalled | --ku don't eliminate uncalled functions\n"
" --nan-clamp favor non-NaN operand in min, max, and clamp\n"
" --no-storage-format | --nsf use Unknown image format\n"
@ -2117,7 +2144,8 @@ void usage()
" initialized with the shader binary code\n"
" --no-link Only compile shader; do not link (GLSL-only)\n"
" NOTE: this option will set the export linkage\n"
" attribute on all functions\n");
" attribute on all functions\n"
" --lto perform link time optimization\n");
exit(EFailUsage);
}

View file

@ -35,7 +35,6 @@
#ifndef WORKLIST_H_INCLUDED
#define WORKLIST_H_INCLUDED
#include "../glslang/OSDependent/osinclude.h"
#include <list>
#include <mutex>
#include <string>

View file

@ -13,10 +13,10 @@ hlsl.aliasOpaque.frag
Name 47 "gss"
Name 51 "gtex"
Name 62 "@entryPointOutput"
Decorate 47(gss) DescriptorSet 0
Decorate 47(gss) Binding 0
Decorate 51(gtex) DescriptorSet 0
Decorate 47(gss) DescriptorSet 0
Decorate 51(gtex) Binding 2
Decorate 51(gtex) DescriptorSet 0
Decorate 62(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -15,14 +15,14 @@ hlsl.flattenOpaque.frag
Name 97 "s2.s2D"
Name 100 "s2.tex"
Name 120 "@entryPointOutput"
Decorate 38(tex) DescriptorSet 0
Decorate 38(tex) Binding 0
Decorate 82(s.s2D) DescriptorSet 0
Decorate 38(tex) DescriptorSet 0
Decorate 82(s.s2D) Binding 1
Decorate 97(s2.s2D) DescriptorSet 0
Decorate 82(s.s2D) DescriptorSet 0
Decorate 97(s2.s2D) Binding 2
Decorate 100(s2.tex) DescriptorSet 0
Decorate 97(s2.s2D) DescriptorSet 0
Decorate 100(s2.tex) Binding 3
Decorate 100(s2.tex) DescriptorSet 0
Decorate 120(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -12,10 +12,10 @@ hlsl.flattenOpaqueInit.vert
Name 43 "g_tInputTexture_sampler"
Name 47 "g_tInputTexture"
Name 80 "@entryPointOutput"
Decorate 43(g_tInputTexture_sampler) DescriptorSet 0
Decorate 43(g_tInputTexture_sampler) Binding 0
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 43(g_tInputTexture_sampler) DescriptorSet 0
Decorate 47(g_tInputTexture) Binding 1
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 80(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -12,10 +12,10 @@ hlsl.flattenOpaqueInitMix.vert
Name 44 "g_tInputTexture_sampler"
Name 47 "g_tInputTexture"
Name 57 "@entryPointOutput"
Decorate 44(g_tInputTexture_sampler) DescriptorSet 0
Decorate 44(g_tInputTexture_sampler) Binding 0
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 44(g_tInputTexture_sampler) DescriptorSet 0
Decorate 47(g_tInputTexture) Binding 1
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 57(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -13,10 +13,10 @@ hlsl.flattenSubset.frag
Name 21 "samp"
Name 33 "tex"
Name 50 "@entryPointOutput"
Decorate 21(samp) DescriptorSet 0
Decorate 21(samp) Binding 0
Decorate 33(tex) DescriptorSet 0
Decorate 21(samp) DescriptorSet 0
Decorate 33(tex) Binding 1
Decorate 33(tex) DescriptorSet 0
Decorate 50(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -0,0 +1,12 @@
error-column.vert
ERROR: error-column.vert:7:16: 'model' : member storage qualifier cannot contradict block storage qualifier
ERROR: error-column.vert:8:16: 'view' : member storage qualifier cannot contradict block storage qualifier
ERROR: error-column.vert:9:16: 'projection' : member storage qualifier cannot contradict block storage qualifier
ERROR: error-column.vert:17:16: 'texCoord1' : member storage qualifier cannot contradict block storage qualifier
ERROR: error-column.vert:24:52: 'Pos' : undeclared identifier
ERROR: error-column.vert:24:60: 'constructor' : not enough data provided for construction
ERROR: error-column.vert:24:17: 'assign' : cannot convert from ' temp highp 4X4 matrix of float' to ' gl_Position 4-component vector of float Position'
ERROR: 7 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View file

@ -14,8 +14,8 @@ glsl.autosampledtextures.frag
Name 13 "u_Tex"
Name 17 "in_UV"
Name 21 "out_Color"
Decorate 13(u_Tex) DescriptorSet 0
Decorate 13(u_Tex) Binding 0
Decorate 13(u_Tex) DescriptorSet 0
Decorate 17(in_UV) Location 0
Decorate 21(out_Color) Location 0
2: TypeVoid

View file

@ -17,11 +17,11 @@ ERROR: Source entry point must be "main"
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 11(gl_PerVertex) 3 "gl_CullDistance"
Name 13 ""
Decorate 11(gl_PerVertex) Block
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 11(gl_PerVertex) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -15,11 +15,11 @@ glsl.entryPointRename.vert
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 11(gl_PerVertex) 3 "gl_CullDistance"
Name 13 ""
Decorate 11(gl_PerVertex) Block
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 11(gl_PerVertex) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -166,12 +166,12 @@ gl_FragCoord origin is upper left
Name 51 "gtex"
Name 56 "param"
Name 62 "@entryPointOutput"
Decorate 44(gss2) DescriptorSet 0
Decorate 44(gss2) Binding 1
Decorate 47(gss) DescriptorSet 0
Decorate 44(gss2) DescriptorSet 0
Decorate 47(gss) Binding 0
Decorate 51(gtex) DescriptorSet 0
Decorate 47(gss) DescriptorSet 0
Decorate 51(gtex) Binding 2
Decorate 51(gtex) DescriptorSet 0
Decorate 62(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -182,14 +182,14 @@ gl_FragCoord origin is upper left
MemberName 20($Global) 3 "d"
MemberName 20($Global) 4 "e"
Name 22 ""
Decorate 20($Global) Block
MemberDecorate 20($Global) 0 Offset 0
MemberDecorate 20($Global) 1 Offset 16
MemberDecorate 20($Global) 2 Offset 32
MemberDecorate 20($Global) 3 Offset 44
MemberDecorate 20($Global) 4 Offset 48
Decorate 20($Global) Block
Decorate 22 DescriptorSet 0
Decorate 22 Binding 0
Decorate 22 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
14: TypeFloat 32

View file

@ -392,44 +392,44 @@ gl_FragCoord origin is upper left
Name 140 "g_samp_explicit[0]"
Name 141 "g_samp_explicit[1]"
Name 142 "g_samp_explicit[2]"
Decorate 42(g_tex[1]) DescriptorSet 0
Decorate 42(g_tex[1]) Binding 4
Decorate 45(g_samp[1]) DescriptorSet 0
Decorate 42(g_tex[1]) DescriptorSet 0
Decorate 45(g_samp[1]) Binding 10
Decorate 65(g_samp[0]) DescriptorSet 0
Decorate 45(g_samp[1]) DescriptorSet 0
Decorate 65(g_samp[0]) Binding 9
Decorate 70(g_samp[2]) DescriptorSet 0
Decorate 65(g_samp[0]) DescriptorSet 0
Decorate 70(g_samp[2]) Binding 11
Decorate 74(g_tex[0]) DescriptorSet 0
Decorate 70(g_samp[2]) DescriptorSet 0
Decorate 74(g_tex[0]) Binding 0
Decorate 79(g_tex[2]) DescriptorSet 0
Decorate 74(g_tex[0]) DescriptorSet 0
Decorate 79(g_tex[2]) Binding 8
Decorate 79(g_tex[2]) DescriptorSet 0
Decorate 88 ArrayStride 48
Decorate 89 ArrayStride 48
Decorate 90 ArrayStride 16
MemberDecorate 91($Global) 0 RowMajor
MemberDecorate 91($Global) 0 Offset 0
MemberDecorate 91($Global) 0 MatrixStride 16
MemberDecorate 91($Global) 1 RowMajor
MemberDecorate 91($Global) 1 Offset 192
MemberDecorate 91($Global) 1 MatrixStride 16
MemberDecorate 91($Global) 2 Offset 384
Decorate 91($Global) Block
Decorate 93 DescriptorSet 0
MemberDecorate 91($Global) 0 RowMajor
MemberDecorate 91($Global) 0 MatrixStride 16
MemberDecorate 91($Global) 0 Offset 0
MemberDecorate 91($Global) 1 RowMajor
MemberDecorate 91($Global) 1 MatrixStride 16
MemberDecorate 91($Global) 1 Offset 192
MemberDecorate 91($Global) 2 Offset 384
Decorate 93 Binding 12
Decorate 93 DescriptorSet 0
Decorate 134(ps_output.color) Location 0
Decorate 137(g_tex_explicit[0]) DescriptorSet 0
Decorate 137(g_tex_explicit[0]) Binding 1
Decorate 138(g_tex_explicit[1]) DescriptorSet 0
Decorate 137(g_tex_explicit[0]) DescriptorSet 0
Decorate 138(g_tex_explicit[1]) Binding 2
Decorate 139(g_tex_explicit[2]) DescriptorSet 0
Decorate 138(g_tex_explicit[1]) DescriptorSet 0
Decorate 139(g_tex_explicit[2]) Binding 3
Decorate 140(g_samp_explicit[0]) DescriptorSet 0
Decorate 139(g_tex_explicit[2]) DescriptorSet 0
Decorate 140(g_samp_explicit[0]) Binding 5
Decorate 141(g_samp_explicit[1]) DescriptorSet 0
Decorate 140(g_samp_explicit[0]) DescriptorSet 0
Decorate 141(g_samp_explicit[1]) Binding 6
Decorate 142(g_samp_explicit[2]) DescriptorSet 0
Decorate 141(g_samp_explicit[1]) DescriptorSet 0
Decorate 142(g_samp_explicit[2]) Binding 7
Decorate 142(g_samp_explicit[2]) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -328,13 +328,13 @@ gl_FragCoord origin is upper left
Decorate 47 ArrayStride 112
Decorate 49 ArrayStride 16
Decorate 50 ArrayStride 16
Decorate 51($Global) Block
MemberDecorate 51($Global) 0 Offset 0
MemberDecorate 51($Global) 1 Offset 64
MemberDecorate 51($Global) 2 Offset 1296
MemberDecorate 51($Global) 3 Offset 1312
Decorate 51($Global) Block
Decorate 53 DescriptorSet 0
Decorate 53 Binding 0
Decorate 53 DescriptorSet 0
Decorate 103(i) Flat
Decorate 103(i) Location 0
Decorate 107(input) Location 1

View file

@ -157,10 +157,10 @@ gl_FragCoord origin is upper left
Decorate 22 ArrayStride 16
Decorate 24 ArrayStride 48
Decorate 26 ArrayStride 192
MemberDecorate 27($Global) 0 Offset 0
Decorate 27($Global) Block
Decorate 29 DescriptorSet 0
MemberDecorate 27($Global) 0 Offset 0
Decorate 29 Binding 0
Decorate 29 DescriptorSet 0
Decorate 54(@entryPointOutput.Color) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -79,10 +79,10 @@ local_size = (4, 6, 8)
Name 18 "$Global"
MemberName 18($Global) 0 "bound"
Name 20 ""
MemberDecorate 18($Global) 0 Offset 0
Decorate 18($Global) Block
Decorate 20 DescriptorSet 0
MemberDecorate 18($Global) 0 Offset 0
Decorate 20 Binding 0
Decorate 20 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
8: TypeInt 32 1

View file

@ -122,23 +122,25 @@ Validation failed
Name 48 "pcBuf"
MemberName 48(pcBuf) 0 "a"
Name 50 ""
Decorate 16(attach) DescriptorSet 0
Decorate 16(attach) Binding 0
Decorate 16(attach) DescriptorSet 0
Decorate 16(attach) InputAttachmentIndex 4
Decorate 33(input) Location 8
Decorate 36(@entryPointOutput) Location 7
MemberDecorate 41(S) 0 Offset 0
Decorate 42 ArrayStride 8
Decorate 43(buffer1) BufferBlock
MemberDecorate 43(buffer1) 0 NonWritable
MemberDecorate 43(buffer1) 0 Offset 0
Decorate 43(buffer1) BufferBlock
Decorate 45(buffer1) DescriptorSet 0
Decorate 45(buffer1) NonWritable
Decorate 45(buffer1) Binding 1
Decorate 46(buffer3) DescriptorSet 2
Decorate 45(buffer1) DescriptorSet 0
Decorate 46(buffer3) NonWritable
Decorate 46(buffer3) Binding 3
Decorate 46(buffer3) DescriptorSet 2
Decorate 47(ci) SpecId 13
MemberDecorate 48(pcBuf) 0 Offset 0
Decorate 48(pcBuf) Block
MemberDecorate 48(pcBuf) 0 Offset 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -72,11 +72,11 @@ gl_FragCoord origin is upper left
MemberName 11($Global) 1 "u2"
Name 13 ""
Name 26 "@entryPointOutput"
Decorate 11($Global) Block
MemberDecorate 11($Global) 0 Offset 0
MemberDecorate 11($Global) 1 Offset 16
Decorate 11($Global) Block
Decorate 13 DescriptorSet 2
Decorate 13 Binding 5
Decorate 13 DescriptorSet 2
Decorate 26(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -22,8 +22,8 @@ hlsl.autosampledtextures.frag
Name 36 "i.vTextureCoords"
Name 40 "@entryPointOutput.vColor"
Name 41 "param"
Decorate 23(g_tColor) DescriptorSet 0
Decorate 23(g_tColor) Binding 0
Decorate 23(g_tColor) DescriptorSet 0
Decorate 36(i.vTextureCoords) Location 0
Decorate 40(@entryPointOutput.vColor) Location 0
2: TypeVoid

View file

@ -0,0 +1,82 @@
hlsl.buffer-offsets.comp
Shader version: 500
local_size = (1, 1, 1)
0:? Sequence
0:12 Function Definition: @main( ( temp void)
0:12 Function Parameters:
0:12 Function Definition: main( ( temp void)
0:12 Function Parameters:
0:? Sequence
0:12 Function Call: @main( ( temp void)
0:? Linker Objects
0:? 'bIterData' (layout( binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 24-element array of float mIntegrationTrafo, temp 3-element array of float mWind, temp uint mIsTurning} @data})
Linked compute stage:
Shader version: 500
local_size = (1, 1, 1)
0:? Sequence
0:12 Function Definition: @main( ( temp void)
0:12 Function Parameters:
0:12 Function Definition: main( ( temp void)
0:12 Function Parameters:
0:? Sequence
0:12 Function Call: @main( ( temp void)
0:? Linker Objects
0:? 'bIterData' (layout( binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 24-element array of float mIntegrationTrafo, temp 3-element array of float mWind, temp uint mIsTurning} @data})
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 20
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "main"
Name 6 "@main("
Name 15 "GfxIterationData"
MemberName 15(GfxIterationData) 0 "mIntegrationTrafo"
MemberName 15(GfxIterationData) 1 "mWind"
MemberName 15(GfxIterationData) 2 "mIsTurning"
Name 17 "bIterData"
MemberName 17(bIterData) 0 "@data"
Name 19 "bIterData"
Decorate 12 ArrayStride 4
Decorate 14 ArrayStride 4
MemberDecorate 15(GfxIterationData) 0 Offset 0
MemberDecorate 15(GfxIterationData) 1 Offset 96
MemberDecorate 15(GfxIterationData) 2 Offset 108
Decorate 16 ArrayStride 112
Decorate 17(bIterData) BufferBlock
MemberDecorate 17(bIterData) 0 NonWritable
MemberDecorate 17(bIterData) 0 Offset 0
Decorate 19(bIterData) NonWritable
Decorate 19(bIterData) Binding 2
Decorate 19(bIterData) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
9: TypeFloat 32
10: TypeInt 32 0
11: 10(int) Constant 24
12: TypeArray 9(float) 11
13: 10(int) Constant 3
14: TypeArray 9(float) 13
15(GfxIterationData): TypeStruct 12 14 10(int)
16: TypeRuntimeArray 15(GfxIterationData)
17(bIterData): TypeStruct 16
18: TypePointer Uniform 17(bIterData)
19(bIterData): 18(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
8: 2 FunctionCall 6(@main()
Return
FunctionEnd
6(@main(): 2 Function None 3
7: Label
Return
FunctionEnd

View file

@ -194,24 +194,26 @@ Validation failed
Name 65 "input"
Name 68 "@entryPointOutput.a"
Name 69 "param"
MemberDecorate 24(cbufName2) 0 Offset 0
Decorate 24(cbufName2) Block
Decorate 26 DescriptorSet 0
MemberDecorate 24(cbufName2) 0 Offset 0
Decorate 26 Binding 3
MemberDecorate 31(buf1) 0 Offset 0
Decorate 26 DescriptorSet 0
Decorate 31(buf1) Block
Decorate 33 DescriptorSet 0
MemberDecorate 31(buf1) 0 Offset 0
Decorate 33 Binding 0
Decorate 33 DescriptorSet 0
Decorate 37(buf2) BufferBlock
MemberDecorate 37(buf2) 0 NonWritable
MemberDecorate 37(buf2) 0 Offset 0
Decorate 37(buf2) BufferBlock
Decorate 39 DescriptorSet 0
Decorate 39 NonWritable
Decorate 39 Binding 1
Decorate 39 DescriptorSet 0
Decorate 43(cbufName) Block
MemberDecorate 43(cbufName) 0 Offset 0
MemberDecorate 43(cbufName) 1 Offset 20
Decorate 43(cbufName) Block
Decorate 45 DescriptorSet 0
Decorate 45 Binding 2
Decorate 45 DescriptorSet 0
Decorate 50(tbufName) BufferBlock
MemberDecorate 50(tbufName) 0 NonWritable
MemberDecorate 50(tbufName) 0 Offset 16
MemberDecorate 50(tbufName) 1 NonWritable
@ -229,24 +231,24 @@ Validation failed
MemberDecorate 50(tbufName) 7 NonWritable
MemberDecorate 50(tbufName) 7 Offset 128
MemberDecorate 50(tbufName) 8 RowMajor
MemberDecorate 50(tbufName) 8 MatrixStride 16
MemberDecorate 50(tbufName) 8 NonWritable
MemberDecorate 50(tbufName) 8 Offset 112
MemberDecorate 50(tbufName) 8 MatrixStride 16
MemberDecorate 50(tbufName) 9 ColMajor
MemberDecorate 50(tbufName) 9 MatrixStride 16
MemberDecorate 50(tbufName) 9 NonWritable
MemberDecorate 50(tbufName) 9 Offset 176
MemberDecorate 50(tbufName) 9 MatrixStride 16
MemberDecorate 50(tbufName) 10 RowMajor
MemberDecorate 50(tbufName) 10 MatrixStride 16
MemberDecorate 50(tbufName) 10 NonWritable
MemberDecorate 50(tbufName) 10 Offset 240
MemberDecorate 50(tbufName) 10 MatrixStride 16
MemberDecorate 50(tbufName) 11 RowMajor
MemberDecorate 50(tbufName) 11 MatrixStride 16
MemberDecorate 50(tbufName) 11 NonWritable
MemberDecorate 50(tbufName) 11 Offset 304
MemberDecorate 50(tbufName) 11 MatrixStride 16
Decorate 50(tbufName) BufferBlock
Decorate 52 DescriptorSet 0
Decorate 52 NonWritable
Decorate 52 Binding 8
Decorate 52 DescriptorSet 0
Decorate 65(input) BuiltIn FragCoord
Decorate 68(@entryPointOutput.a) Location 0
2: TypeVoid

View file

@ -275,17 +275,18 @@ local_size = (64, 1, 1)
Name 85 "gi"
Name 87 "param"
Decorate 7 ArrayStride 4
Decorate 8 Block
MemberDecorate 8 0 NonWritable
MemberDecorate 8 0 Offset 0
Decorate 8 Block
Decorate 14(buffer_position) NonWritable
Decorate 53(buffer_position_ms) DescriptorSet 0
Decorate 53(buffer_position_ms) NonWritable
Decorate 53(buffer_position_ms) Binding 0
Decorate 53(buffer_position_ms) DescriptorSet 0
Decorate 59 ArrayStride 4
MemberDecorate 60(r) 0 Offset 0
Decorate 60(r) Block
Decorate 62(r) DescriptorSet 0
MemberDecorate 60(r) 0 Offset 0
Decorate 62(r) Binding 1
Decorate 62(r) DescriptorSet 0
Decorate 85(gi) BuiltIn LocalInvocationIndex
2: TypeVoid
3: TypeFunction 2

View file

@ -400,30 +400,30 @@ using depth_any
Name 140 "@entryPointOutput.Color"
Name 144 "@entryPointOutput.Depth"
Name 147 "g_tTex1df4"
Decorate 16(g_tTex1df4a) DescriptorSet 0
Decorate 16(g_tTex1df4a) Binding 1
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex1df4a) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 33(g_tTex1di4a) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 33(g_tTex1di4a) Binding 2
Decorate 45(g_tTex1du4a) DescriptorSet 0
Decorate 33(g_tTex1di4a) DescriptorSet 0
Decorate 45(g_tTex1du4a) Binding 3
Decorate 56(g_tTex2df4a) DescriptorSet 0
Decorate 45(g_tTex1du4a) DescriptorSet 0
Decorate 56(g_tTex2df4a) Binding 4
Decorate 67(g_tTex2di4a) DescriptorSet 0
Decorate 56(g_tTex2df4a) DescriptorSet 0
Decorate 67(g_tTex2di4a) Binding 5
Decorate 79(g_tTex2du4a) DescriptorSet 0
Decorate 67(g_tTex2di4a) DescriptorSet 0
Decorate 79(g_tTex2du4a) Binding 6
Decorate 92(g_tTexcdf4a) DescriptorSet 0
Decorate 79(g_tTex2du4a) DescriptorSet 0
Decorate 92(g_tTexcdf4a) Binding 7
Decorate 104(g_tTexcdi4a) DescriptorSet 0
Decorate 92(g_tTexcdf4a) DescriptorSet 0
Decorate 104(g_tTexcdi4a) Binding 8
Decorate 115(g_tTexcdu4a) DescriptorSet 0
Decorate 104(g_tTexcdi4a) DescriptorSet 0
Decorate 115(g_tTexcdu4a) Binding 9
Decorate 115(g_tTexcdu4a) DescriptorSet 0
Decorate 140(@entryPointOutput.Color) Location 0
Decorate 144(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 147(g_tTex1df4) DescriptorSet 0
Decorate 147(g_tTex1df4) Binding 0
Decorate 147(g_tTex1df4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -400,30 +400,30 @@ using depth_any
Name 140 "@entryPointOutput.Color"
Name 144 "@entryPointOutput.Depth"
Name 147 "g_tTex1df4"
Decorate 16(g_tTex1df4a) DescriptorSet 0
Decorate 16(g_tTex1df4a) Binding 1
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex1df4a) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 33(g_tTex1di4a) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 33(g_tTex1di4a) Binding 2
Decorate 45(g_tTex1du4a) DescriptorSet 0
Decorate 33(g_tTex1di4a) DescriptorSet 0
Decorate 45(g_tTex1du4a) Binding 3
Decorate 56(g_tTex2df4a) DescriptorSet 0
Decorate 45(g_tTex1du4a) DescriptorSet 0
Decorate 56(g_tTex2df4a) Binding 4
Decorate 67(g_tTex2di4a) DescriptorSet 0
Decorate 56(g_tTex2df4a) DescriptorSet 0
Decorate 67(g_tTex2di4a) Binding 5
Decorate 79(g_tTex2du4a) DescriptorSet 0
Decorate 67(g_tTex2di4a) DescriptorSet 0
Decorate 79(g_tTex2du4a) Binding 6
Decorate 92(g_tTexcdf4a) DescriptorSet 0
Decorate 79(g_tTex2du4a) DescriptorSet 0
Decorate 92(g_tTexcdf4a) Binding 7
Decorate 104(g_tTexcdi4a) DescriptorSet 0
Decorate 92(g_tTexcdf4a) DescriptorSet 0
Decorate 104(g_tTexcdi4a) Binding 8
Decorate 115(g_tTexcdu4a) DescriptorSet 0
Decorate 104(g_tTexcdi4a) DescriptorSet 0
Decorate 115(g_tTexcdu4a) Binding 9
Decorate 115(g_tTexcdu4a) DescriptorSet 0
Decorate 140(@entryPointOutput.Color) Location 0
Decorate 144(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 147(g_tTex1df4) DescriptorSet 0
Decorate 147(g_tTex1df4) Binding 0
Decorate 147(g_tTex1df4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -281,18 +281,18 @@ Shader version: 500
Name 82 "param"
Name 86 "@entryPointOutput.Pos"
Name 90 "@entryPointOutput.Norm"
MemberDecorate 28(C) 0 RowMajor
MemberDecorate 28(C) 0 Offset 0
MemberDecorate 28(C) 0 MatrixStride 16
MemberDecorate 28(C) 1 RowMajor
MemberDecorate 28(C) 1 Offset 64
MemberDecorate 28(C) 1 MatrixStride 16
MemberDecorate 28(C) 2 RowMajor
MemberDecorate 28(C) 2 Offset 128
MemberDecorate 28(C) 2 MatrixStride 16
Decorate 28(C) Block
Decorate 30 DescriptorSet 0
MemberDecorate 28(C) 0 RowMajor
MemberDecorate 28(C) 0 MatrixStride 16
MemberDecorate 28(C) 0 Offset 0
MemberDecorate 28(C) 1 RowMajor
MemberDecorate 28(C) 1 MatrixStride 16
MemberDecorate 28(C) 1 Offset 64
MemberDecorate 28(C) 2 RowMajor
MemberDecorate 28(C) 2 MatrixStride 16
MemberDecorate 28(C) 2 Offset 128
Decorate 30 Binding 0
Decorate 30 DescriptorSet 0
Decorate 74(input.Pos) Location 0
Decorate 78(input.Norm) Location 1
Decorate 86(@entryPointOutput.Pos) BuiltIn Position

View file

@ -70,63 +70,63 @@ Validation failed
Name 27 ""
Decorate 13 ArrayStride 16
Decorate 24 ArrayStride 16
Decorate 25(CB) Block
MemberDecorate 25(CB) 0 Offset 0
MemberDecorate 25(CB) 1 Offset 16
MemberDecorate 25(CB) 2 Offset 60
MemberDecorate 25(CB) 3 Offset 64
MemberDecorate 25(CB) 4 RowMajor
MemberDecorate 25(CB) 4 Offset 68
MemberDecorate 25(CB) 4 MatrixStride 16
MemberDecorate 25(CB) 4 Offset 68
MemberDecorate 25(CB) 5 RowMajor
MemberDecorate 25(CB) 5 Offset 80
MemberDecorate 25(CB) 5 MatrixStride 16
MemberDecorate 25(CB) 5 Offset 80
MemberDecorate 25(CB) 6 RowMajor
MemberDecorate 25(CB) 6 Offset 100
MemberDecorate 25(CB) 6 MatrixStride 16
MemberDecorate 25(CB) 6 Offset 100
MemberDecorate 25(CB) 7 RowMajor
MemberDecorate 25(CB) 7 Offset 112
MemberDecorate 25(CB) 7 MatrixStride 16
MemberDecorate 25(CB) 7 Offset 112
MemberDecorate 25(CB) 8 RowMajor
MemberDecorate 25(CB) 8 Offset 144
MemberDecorate 25(CB) 8 MatrixStride 16
MemberDecorate 25(CB) 8 Offset 144
MemberDecorate 25(CB) 9 Offset 188
MemberDecorate 25(CB) 10 RowMajor
MemberDecorate 25(CB) 10 Offset 192
MemberDecorate 25(CB) 10 MatrixStride 16
MemberDecorate 25(CB) 10 Offset 192
MemberDecorate 25(CB) 11 Offset 252
MemberDecorate 25(CB) 12 RowMajor
MemberDecorate 25(CB) 12 Offset 256
MemberDecorate 25(CB) 12 MatrixStride 16
MemberDecorate 25(CB) 12 Offset 256
MemberDecorate 25(CB) 13 Offset 304
MemberDecorate 25(CB) 14 ColMajor
MemberDecorate 25(CB) 14 Offset 308
MemberDecorate 25(CB) 14 MatrixStride 16
MemberDecorate 25(CB) 14 Offset 308
MemberDecorate 25(CB) 15 ColMajor
MemberDecorate 25(CB) 15 Offset 312
MemberDecorate 25(CB) 15 MatrixStride 16
MemberDecorate 25(CB) 15 Offset 312
MemberDecorate 25(CB) 16 ColMajor
MemberDecorate 25(CB) 16 Offset 320
MemberDecorate 25(CB) 16 MatrixStride 16
MemberDecorate 25(CB) 16 Offset 320
MemberDecorate 25(CB) 17 ColMajor
MemberDecorate 25(CB) 17 Offset 352
MemberDecorate 25(CB) 17 MatrixStride 16
MemberDecorate 25(CB) 17 Offset 352
MemberDecorate 25(CB) 18 ColMajor
MemberDecorate 25(CB) 18 Offset 384
MemberDecorate 25(CB) 18 MatrixStride 16
MemberDecorate 25(CB) 18 Offset 384
MemberDecorate 25(CB) 19 Offset 428
MemberDecorate 25(CB) 20 ColMajor
MemberDecorate 25(CB) 20 Offset 432
MemberDecorate 25(CB) 20 MatrixStride 16
MemberDecorate 25(CB) 20 Offset 432
MemberDecorate 25(CB) 21 Offset 480
MemberDecorate 25(CB) 22 ColMajor
MemberDecorate 25(CB) 22 Offset 496
MemberDecorate 25(CB) 22 MatrixStride 16
MemberDecorate 25(CB) 22 Offset 496
MemberDecorate 25(CB) 23 Offset 556
MemberDecorate 25(CB) 24 Offset 560
MemberDecorate 25(CB) 25 Offset 596
Decorate 25(CB) Block
Decorate 27 DescriptorSet 0
Decorate 27 Binding 0
Decorate 27 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
9: TypeFloat 32

View file

@ -583,21 +583,21 @@ triangle order = cw
Name 137 "param"
Name 142 "@patchConstantOutput.edges"
Name 155 "@patchConstantOutput.inside"
Decorate 33(TessellationBuffer) Block
MemberDecorate 33(TessellationBuffer) 0 Offset 0
MemberDecorate 33(TessellationBuffer) 1 Offset 4
Decorate 33(TessellationBuffer) Block
Decorate 35 DescriptorSet 0
Decorate 35 Binding 0
Decorate 35 DescriptorSet 0
Decorate 73(patch.position) Location 0
Decorate 80(patch.color) Location 1
Decorate 99(pointId) BuiltIn InvocationId
Decorate 102(patchId) BuiltIn PrimitiveId
Decorate 113(@entryPointOutput.position) Location 0
Decorate 120(@entryPointOutput.color) Location 1
Decorate 142(@patchConstantOutput.edges) Patch
Decorate 142(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 155(@patchConstantOutput.inside) Patch
Decorate 142(@patchConstantOutput.edges) Patch
Decorate 155(@patchConstantOutput.inside) BuiltIn TessLevelInner
Decorate 155(@patchConstantOutput.inside) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -297,10 +297,10 @@ gl_FragCoord origin is upper left
MemberName 93($Global) 0 "uf4"
Name 95 ""
Decorate 90(@entryPointOutput.Color) Location 0
MemberDecorate 93($Global) 0 Offset 0
Decorate 93($Global) Block
Decorate 95 DescriptorSet 0
MemberDecorate 93($Global) 0 Offset 0
Decorate 95 Binding 0
Decorate 95 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -696,14 +696,14 @@ gl_FragCoord origin is upper left
Name 226 "input"
Name 229 "@entryPointOutput"
Name 230 "param"
Decorate 29($Global) Block
MemberDecorate 29($Global) 0 Offset 0
MemberDecorate 29($Global) 1 Offset 16
MemberDecorate 29($Global) 2 Offset 32
MemberDecorate 29($Global) 3 Offset 48
MemberDecorate 29($Global) 4 Offset 52
Decorate 29($Global) Block
Decorate 31 DescriptorSet 0
Decorate 31 Binding 0
Decorate 31 DescriptorSet 0
Decorate 226(input) Location 0
Decorate 229(@entryPointOutput) Location 0
2: TypeVoid

View file

@ -156,21 +156,21 @@ Validation failed
MemberName 46(cbuff) 0 "c1"
Name 48 ""
Name 64 "@entryPointOutput"
Decorate 12(cb3) Block
MemberDecorate 12(cb3) 0 Offset 0
MemberDecorate 12(cb3) 1 Offset 4
Decorate 12(cb3) Block
Decorate 18(cb3) DescriptorSet 0
Decorate 18(cb3) Binding 1
MemberDecorate 31(cb1) 0 Offset 0
Decorate 18(cb3) DescriptorSet 0
Decorate 31(cb1) Block
Decorate 33(cb1) DescriptorSet 0
MemberDecorate 31(cb1) 0 Offset 0
Decorate 33(cb1) Binding 12
Decorate 40(cb2) DescriptorSet 0
Decorate 33(cb1) DescriptorSet 0
Decorate 40(cb2) Binding 0
MemberDecorate 46(cbuff) 0 Offset 0
Decorate 40(cb2) DescriptorSet 0
Decorate 46(cbuff) Block
Decorate 48 DescriptorSet 0
MemberDecorate 46(cbuff) 0 Offset 0
Decorate 48 Binding 2
Decorate 48 DescriptorSet 0
Decorate 64(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -18,14 +18,14 @@ hlsl.dashI.vert
MemberName 11($Global) 4 "i4"
Name 13 ""
Name 38 "@entryPointOutput"
Decorate 11($Global) Block
MemberDecorate 11($Global) 0 Offset 0
MemberDecorate 11($Global) 1 Offset 16
MemberDecorate 11($Global) 2 Offset 32
MemberDecorate 11($Global) 3 Offset 48
MemberDecorate 11($Global) 4 Offset 64
Decorate 11($Global) Block
Decorate 13 DescriptorSet 0
Decorate 13 Binding 0
Decorate 13 DescriptorSet 0
Decorate 38(@entryPointOutput) BuiltIn Position
2: TypeVoid
3: TypeFunction 2

View file

@ -473,12 +473,12 @@ triangle order = none
Decorate 62(i.norm) Location 1
Decorate 82(f) Patch
Decorate 82(f) Location 2
Decorate 85(tesscoord) Patch
Decorate 85(tesscoord) BuiltIn TessCoord
Decorate 91(pcf_data.flTessFactor) Patch
Decorate 85(tesscoord) Patch
Decorate 91(pcf_data.flTessFactor) BuiltIn TessLevelOuter
Decorate 104(pcf_data.flInsideTessFactor) Patch
Decorate 91(pcf_data.flTessFactor) Patch
Decorate 104(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
Decorate 104(pcf_data.flInsideTessFactor) Patch
Decorate 118(@entryPointOutput.pos) Location 0
Decorate 122(@entryPointOutput.norm) Location 1
2: TypeVoid

View file

@ -465,16 +465,16 @@ triangle order = none
Name 109 "param"
Name 113 "@entryPointOutput.pos"
Name 117 "@entryPointOutput.norm"
Decorate 52(pcf_data.flTessFactor) Patch
Decorate 52(pcf_data.flTessFactor) BuiltIn TessLevelOuter
Decorate 67(pcf_data.flInsideTessFactor) Patch
Decorate 52(pcf_data.flTessFactor) Patch
Decorate 67(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
Decorate 67(pcf_data.flInsideTessFactor) Patch
Decorate 71(pcf_data.foo) Patch
Decorate 71(pcf_data.foo) Location 2
Decorate 78(i.pos) Location 0
Decorate 85(i.norm) Location 1
Decorate 103(tesscoord) Patch
Decorate 103(tesscoord) BuiltIn TessCoord
Decorate 103(tesscoord) Patch
Decorate 113(@entryPointOutput.pos) Location 0
Decorate 117(@entryPointOutput.norm) Location 1
2: TypeVoid

View file

@ -397,12 +397,12 @@ triangle order = none
Name 113 "@entryPointOutput.norm"
Decorate 55(i.pos) Location 0
Decorate 62(i.norm) Location 1
Decorate 74(tesscoord) Patch
Decorate 74(tesscoord) BuiltIn TessCoord
Decorate 83(pcf_data.flTessFactor) Patch
Decorate 74(tesscoord) Patch
Decorate 83(pcf_data.flTessFactor) BuiltIn TessLevelOuter
Decorate 97(pcf_data.flInsideTessFactor) Patch
Decorate 83(pcf_data.flTessFactor) Patch
Decorate 97(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
Decorate 97(pcf_data.flInsideTessFactor) Patch
Decorate 109(@entryPointOutput.pos) Location 0
Decorate 113(@entryPointOutput.norm) Location 1
2: TypeVoid

View file

@ -129,8 +129,8 @@ using early_fragment_tests
Name 41 "input.Position"
Name 46 "@entryPointOutput"
Name 47 "param"
Decorate 19(Values) DescriptorSet 0
Decorate 19(Values) Binding 0
Decorate 19(Values) DescriptorSet 0
Decorate 41(input.Position) BuiltIn FragCoord
Decorate 46(@entryPointOutput) Location 0
2: TypeVoid

View file

@ -439,10 +439,10 @@ Validation failed
Decorate 65(patch.position) BuiltIn Position
Decorate 79(pointId) BuiltIn InvocationId
Decorate 82(patchId) BuiltIn PrimitiveId
Decorate 115(@patchConstantOutput.edges) Patch
Decorate 115(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 128(@patchConstantOutput.inside) Patch
Decorate 115(@patchConstantOutput.edges) Patch
Decorate 128(@patchConstantOutput.inside) BuiltIn TessLevelInner
Decorate 128(@patchConstantOutput.inside) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -92,10 +92,10 @@ gl_FragCoord origin is upper left
MemberName 29($Global) 0 "also_not_the_entry_point"
Name 31 ""
Decorate 26(@entryPointOutput.Color) Location 0
MemberDecorate 29($Global) 0 Offset 0
Decorate 29($Global) Block
Decorate 31 DescriptorSet 0
MemberDecorate 29($Global) 0 Offset 0
Decorate 31 Binding 0
Decorate 31 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32

View file

@ -21,19 +21,19 @@ hlsl.explicitDescriptorSet.frag
MemberName 25($Global) 0 "floatval_amb"
Name 27 ""
Name 30 "floatbuff"
Decorate 13(g_sSamp2_amb) DescriptorSet 3
Decorate 13(g_sSamp2_amb) Binding 10
Decorate 13(g_sSamp2_amb) DescriptorSet 3
Decorate 19(@entryPointOutput) Location 0
Decorate 21(g_sSamp) DescriptorSet 3
Decorate 21(g_sSamp) Binding 11
Decorate 24(g_tTex1df4) DescriptorSet 3
Decorate 21(g_sSamp) DescriptorSet 3
Decorate 24(g_tTex1df4) Binding 20
MemberDecorate 25($Global) 0 Offset 0
Decorate 24(g_tTex1df4) DescriptorSet 3
Decorate 25($Global) Block
Decorate 27 DescriptorSet 3
MemberDecorate 25($Global) 0 Offset 0
Decorate 27 Binding 0
Decorate 30(floatbuff) DescriptorSet 3
Decorate 27 DescriptorSet 3
Decorate 30(floatbuff) Binding 0
Decorate 30(floatbuff) DescriptorSet 3
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -21,19 +21,19 @@ hlsl.explicitDescriptorSet.frag
MemberName 25($Global) 0 "floatval_amb"
Name 27 ""
Name 30 "floatbuff"
Decorate 13(g_sSamp2_amb) DescriptorSet 4
Decorate 13(g_sSamp2_amb) Binding 10
Decorate 13(g_sSamp2_amb) DescriptorSet 4
Decorate 19(@entryPointOutput) Location 0
Decorate 21(g_sSamp) DescriptorSet 4
Decorate 21(g_sSamp) Binding 11
Decorate 24(g_tTex1df4) DescriptorSet 4
Decorate 21(g_sSamp) DescriptorSet 4
Decorate 24(g_tTex1df4) Binding 20
MemberDecorate 25($Global) 0 Offset 0
Decorate 24(g_tTex1df4) DescriptorSet 4
Decorate 25($Global) Block
Decorate 27 DescriptorSet 4
MemberDecorate 25($Global) 0 Offset 0
Decorate 27 Binding 0
Decorate 30(floatbuff) DescriptorSet 4
Decorate 27 DescriptorSet 4
Decorate 30(floatbuff) Binding 0
Decorate 30(floatbuff) DescriptorSet 4
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -336,14 +336,14 @@ gl_FragCoord origin is upper left
Name 112 "param"
Name 114 "param"
Name 120 "@entryPointOutput"
Decorate 38(tex) DescriptorSet 0
Decorate 38(tex) Binding 0
Decorate 82(s.s2D) DescriptorSet 0
Decorate 38(tex) DescriptorSet 0
Decorate 82(s.s2D) Binding 1
Decorate 97(s2.s2D) DescriptorSet 0
Decorate 82(s.s2D) DescriptorSet 0
Decorate 97(s2.s2D) Binding 2
Decorate 100(s2.tex) DescriptorSet 0
Decorate 97(s2.s2D) DescriptorSet 0
Decorate 100(s2.tex) Binding 3
Decorate 100(s2.tex) DescriptorSet 0
Decorate 120(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -192,10 +192,10 @@ Shader version: 500
Name 69 "tex3"
Name 71 "param"
Name 80 "@entryPointOutput"
Decorate 43(g_tInputTexture_sampler) DescriptorSet 0
Decorate 43(g_tInputTexture_sampler) Binding 0
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 43(g_tInputTexture_sampler) DescriptorSet 0
Decorate 47(g_tInputTexture) Binding 1
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 80(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -128,10 +128,10 @@ Shader version: 500
Name 47 "g_tInputTexture"
Name 51 "param"
Name 57 "@entryPointOutput"
Decorate 44(g_tInputTexture_sampler) DescriptorSet 0
Decorate 44(g_tInputTexture_sampler) Binding 0
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 44(g_tInputTexture_sampler) DescriptorSet 0
Decorate 47(g_tInputTexture) Binding 1
Decorate 47(g_tInputTexture) DescriptorSet 0
Decorate 57(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -151,10 +151,10 @@ gl_FragCoord origin is upper left
Name 47 "vpos"
Name 50 "@entryPointOutput"
Name 51 "param"
Decorate 21(samp) DescriptorSet 0
Decorate 21(samp) Binding 0
Decorate 33(tex) DescriptorSet 0
Decorate 21(samp) DescriptorSet 0
Decorate 33(tex) Binding 1
Decorate 33(tex) DescriptorSet 0
Decorate 47(vpos) Location 0
Decorate 50(@entryPointOutput) Location 0
2: TypeVoid

View file

@ -179,8 +179,8 @@ gl_FragCoord origin is upper left
Name 49 "vpos"
Name 52 "@entryPointOutput"
Name 53 "param"
Decorate 36(someTex) DescriptorSet 0
Decorate 36(someTex) Binding 0
Decorate 36(someTex) DescriptorSet 0
Decorate 49(vpos) Location 0
Decorate 52(@entryPointOutput) Location 0
2: TypeVoid

View file

@ -61,14 +61,14 @@ gl_FragCoord origin is upper left
MemberName 15($Global) 3 "ff3"
MemberName 15($Global) 4 "ff4"
Name 17 ""
Decorate 15($Global) Block
MemberDecorate 15($Global) 0 Offset 0
MemberDecorate 15($Global) 1 Offset 16
MemberDecorate 15($Global) 2 Offset 20
MemberDecorate 15($Global) 3 Offset 32
MemberDecorate 15($Global) 4 Offset 48
Decorate 15($Global) Block
Decorate 17 DescriptorSet 0
Decorate 17 Binding 0
Decorate 17 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -248,92 +248,92 @@ using depth_any
Name 159 "g_tTex25"
Decorate 29(@entryPointOutput.Color) Location 0
Decorate 33(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 38(g_sSamp) DescriptorSet 0
Decorate 38(g_sSamp) Binding 0
Decorate 41(g_tTex1df4) DescriptorSet 0
Decorate 38(g_sSamp) DescriptorSet 0
Decorate 41(g_tTex1df4) Binding 0
Decorate 44(g_tTex1di4) DescriptorSet 0
Decorate 41(g_tTex1df4) DescriptorSet 0
Decorate 44(g_tTex1di4) Binding 0
Decorate 48(g_tTex1du4) DescriptorSet 0
Decorate 44(g_tTex1di4) DescriptorSet 0
Decorate 48(g_tTex1du4) Binding 0
Decorate 51(g_tTex2df4) DescriptorSet 0
Decorate 48(g_tTex1du4) DescriptorSet 0
Decorate 51(g_tTex2df4) Binding 0
Decorate 54(g_tTex2di4) DescriptorSet 0
Decorate 51(g_tTex2df4) DescriptorSet 0
Decorate 54(g_tTex2di4) Binding 0
Decorate 57(g_tTex2du4) DescriptorSet 0
Decorate 54(g_tTex2di4) DescriptorSet 0
Decorate 57(g_tTex2du4) Binding 0
Decorate 60(g_tTex3df4) DescriptorSet 0
Decorate 60(g_tTex3df4) Binding 0
Decorate 57(g_tTex2du4) DescriptorSet 0
Decorate 60(g_tTex3df4) NonWritable
Decorate 63(g_tTex3di4) DescriptorSet 0
Decorate 63(g_tTex3di4) Binding 0
Decorate 60(g_tTex3df4) Binding 0
Decorate 60(g_tTex3df4) DescriptorSet 0
Decorate 63(g_tTex3di4) NonReadable
Decorate 66(g_tTex3du4) DescriptorSet 0
Decorate 66(g_tTex3du4) Binding 0
Decorate 63(g_tTex3di4) Binding 0
Decorate 63(g_tTex3di4) DescriptorSet 0
Decorate 66(g_tTex3du4) NonWritable
Decorate 66(g_tTex3du4) NonReadable
Decorate 69(g_tTex1df4a) DescriptorSet 0
Decorate 66(g_tTex3du4) Binding 0
Decorate 66(g_tTex3du4) DescriptorSet 0
Decorate 69(g_tTex1df4a) Binding 0
Decorate 72(g_tTex1di4a) DescriptorSet 0
Decorate 69(g_tTex1df4a) DescriptorSet 0
Decorate 72(g_tTex1di4a) Binding 0
Decorate 75(g_tTex1du4a) DescriptorSet 0
Decorate 72(g_tTex1di4a) DescriptorSet 0
Decorate 75(g_tTex1du4a) Binding 0
Decorate 78(g_tTex2df4a) DescriptorSet 0
Decorate 75(g_tTex1du4a) DescriptorSet 0
Decorate 78(g_tTex2df4a) Binding 0
Decorate 81(g_tTex2di4a) DescriptorSet 0
Decorate 78(g_tTex2df4a) DescriptorSet 0
Decorate 81(g_tTex2di4a) Binding 0
Decorate 84(g_tTex2du4a) DescriptorSet 0
Decorate 81(g_tTex2di4a) DescriptorSet 0
Decorate 84(g_tTex2du4a) Binding 0
Decorate 87(g_tTex01) DescriptorSet 0
Decorate 84(g_tTex2du4a) DescriptorSet 0
Decorate 87(g_tTex01) Binding 0
Decorate 90(g_tTex02) DescriptorSet 0
Decorate 87(g_tTex01) DescriptorSet 0
Decorate 90(g_tTex02) Binding 0
Decorate 93(g_tTex03) DescriptorSet 0
Decorate 90(g_tTex02) DescriptorSet 0
Decorate 93(g_tTex03) Binding 0
Decorate 96(g_tTex04) DescriptorSet 0
Decorate 93(g_tTex03) DescriptorSet 0
Decorate 96(g_tTex04) Binding 0
Decorate 99(g_tTex05) DescriptorSet 0
Decorate 96(g_tTex04) DescriptorSet 0
Decorate 99(g_tTex05) Binding 0
Decorate 102(g_tTex06) DescriptorSet 0
Decorate 99(g_tTex05) DescriptorSet 0
Decorate 102(g_tTex06) Binding 0
Decorate 105(g_tTex07) DescriptorSet 0
Decorate 102(g_tTex06) DescriptorSet 0
Decorate 105(g_tTex07) Binding 0
Decorate 108(g_tTex08) DescriptorSet 0
Decorate 105(g_tTex07) DescriptorSet 0
Decorate 108(g_tTex08) Binding 0
Decorate 111(g_tTex09) DescriptorSet 0
Decorate 108(g_tTex08) DescriptorSet 0
Decorate 111(g_tTex09) Binding 0
Decorate 114(g_tTex10) DescriptorSet 0
Decorate 111(g_tTex09) DescriptorSet 0
Decorate 114(g_tTex10) Binding 0
Decorate 117(g_tTex11) DescriptorSet 0
Decorate 114(g_tTex10) DescriptorSet 0
Decorate 117(g_tTex11) Binding 0
Decorate 120(g_tTex12) DescriptorSet 0
Decorate 117(g_tTex11) DescriptorSet 0
Decorate 120(g_tTex12) Binding 0
Decorate 123(g_tTex13) DescriptorSet 0
Decorate 120(g_tTex12) DescriptorSet 0
Decorate 123(g_tTex13) Binding 0
Decorate 126(g_tTex14) DescriptorSet 0
Decorate 123(g_tTex13) DescriptorSet 0
Decorate 126(g_tTex14) Binding 0
Decorate 129(g_tTex15) DescriptorSet 0
Decorate 126(g_tTex14) DescriptorSet 0
Decorate 129(g_tTex15) Binding 0
Decorate 132(g_tTex16) DescriptorSet 0
Decorate 129(g_tTex15) DescriptorSet 0
Decorate 132(g_tTex16) Binding 0
Decorate 135(g_tTex17) DescriptorSet 0
Decorate 132(g_tTex16) DescriptorSet 0
Decorate 135(g_tTex17) Binding 0
Decorate 138(g_tTex18) DescriptorSet 0
Decorate 135(g_tTex17) DescriptorSet 0
Decorate 138(g_tTex18) Binding 0
Decorate 141(g_tTex19) DescriptorSet 0
Decorate 138(g_tTex18) DescriptorSet 0
Decorate 141(g_tTex19) Binding 0
Decorate 144(g_tTex20) DescriptorSet 0
Decorate 141(g_tTex19) DescriptorSet 0
Decorate 144(g_tTex20) Binding 0
Decorate 147(g_tTex21) DescriptorSet 0
Decorate 144(g_tTex20) DescriptorSet 0
Decorate 147(g_tTex21) Binding 0
Decorate 150(g_tTex22) DescriptorSet 0
Decorate 147(g_tTex21) DescriptorSet 0
Decorate 150(g_tTex22) Binding 0
Decorate 153(g_tTex23) DescriptorSet 0
Decorate 150(g_tTex22) DescriptorSet 0
Decorate 153(g_tTex23) Binding 0
Decorate 156(g_tTex24) DescriptorSet 0
Decorate 153(g_tTex23) DescriptorSet 0
Decorate 156(g_tTex24) Binding 0
Decorate 159(g_tTex25) DescriptorSet 0
Decorate 156(g_tTex24) DescriptorSet 0
Decorate 159(g_tTex25) Binding 0
Decorate 159(g_tTex25) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -300,30 +300,30 @@ using depth_any
Name 117 "g_tTex1df4"
Name 120 "g_tTex1di4a"
Name 123 "g_tTex1du4a"
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 16(g_tTex2df4a) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 37(g_tTex2di4a) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 37(g_tTex2di4a) Binding 3
Decorate 52(g_tTex2du4a) DescriptorSet 0
Decorate 37(g_tTex2di4a) DescriptorSet 0
Decorate 52(g_tTex2du4a) Binding 4
Decorate 64(g_tTexcdf4a) DescriptorSet 0
Decorate 52(g_tTex2du4a) DescriptorSet 0
Decorate 64(g_tTexcdf4a) Binding 5
Decorate 74(g_tTexcdi4a) DescriptorSet 0
Decorate 64(g_tTexcdf4a) DescriptorSet 0
Decorate 74(g_tTexcdi4a) Binding 6
Decorate 84(g_tTexcdu4a) DescriptorSet 0
Decorate 74(g_tTexcdi4a) DescriptorSet 0
Decorate 84(g_tTexcdu4a) Binding 7
Decorate 84(g_tTexcdu4a) DescriptorSet 0
Decorate 107(@entryPointOutput.Color) Location 0
Decorate 111(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 116(g_tTex1df4a) DescriptorSet 0
Decorate 116(g_tTex1df4a) Binding 1
Decorate 117(g_tTex1df4) DescriptorSet 0
Decorate 116(g_tTex1df4a) DescriptorSet 0
Decorate 117(g_tTex1df4) Binding 0
Decorate 120(g_tTex1di4a) DescriptorSet 0
Decorate 117(g_tTex1df4) DescriptorSet 0
Decorate 120(g_tTex1di4a) Binding 0
Decorate 123(g_tTex1du4a) DescriptorSet 0
Decorate 120(g_tTex1di4a) DescriptorSet 0
Decorate 123(g_tTex1du4a) Binding 0
Decorate 123(g_tTex1du4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -299,38 +299,38 @@ using depth_any
Name 128 "g_tTex3df4"
Name 131 "g_tTex3di4"
Name 134 "g_tTex3du4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 36(g_tTex2di4) Binding 3
Decorate 51(g_tTex2du4) DescriptorSet 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 51(g_tTex2du4) Binding 4
Decorate 63(g_tTexcdf4) DescriptorSet 0
Decorate 51(g_tTex2du4) DescriptorSet 0
Decorate 63(g_tTexcdf4) Binding 5
Decorate 74(g_tTexcdi4) DescriptorSet 0
Decorate 63(g_tTexcdf4) DescriptorSet 0
Decorate 74(g_tTexcdi4) Binding 6
Decorate 84(g_tTexcdu4) DescriptorSet 0
Decorate 74(g_tTexcdi4) DescriptorSet 0
Decorate 84(g_tTexcdu4) Binding 7
Decorate 84(g_tTexcdu4) DescriptorSet 0
Decorate 108(@entryPointOutput.Color) Location 0
Decorate 112(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 115(g_sSamp2d) DescriptorSet 0
Decorate 115(g_sSamp2d) Binding 0
Decorate 118(g_tTex1df4a) DescriptorSet 0
Decorate 115(g_sSamp2d) DescriptorSet 0
Decorate 118(g_tTex1df4a) Binding 1
Decorate 119(g_tTex1df4) DescriptorSet 0
Decorate 118(g_tTex1df4a) DescriptorSet 0
Decorate 119(g_tTex1df4) Binding 0
Decorate 122(g_tTex1di4) DescriptorSet 0
Decorate 119(g_tTex1df4) DescriptorSet 0
Decorate 122(g_tTex1di4) Binding 0
Decorate 125(g_tTex1du4) DescriptorSet 0
Decorate 122(g_tTex1di4) DescriptorSet 0
Decorate 125(g_tTex1du4) Binding 0
Decorate 128(g_tTex3df4) DescriptorSet 0
Decorate 125(g_tTex1du4) DescriptorSet 0
Decorate 128(g_tTex3df4) Binding 0
Decorate 131(g_tTex3di4) DescriptorSet 0
Decorate 128(g_tTex3df4) DescriptorSet 0
Decorate 131(g_tTex3di4) Binding 0
Decorate 134(g_tTex3du4) DescriptorSet 0
Decorate 131(g_tTex3di4) DescriptorSet 0
Decorate 134(g_tTex3du4) Binding 0
Decorate 134(g_tTex3du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -256,37 +256,37 @@ Shader version: 500
Name 119 "g_tTex3df4"
Name 122 "g_tTex3di4"
Name 125 "g_tTex3du4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 36(g_tTex2di4) Binding 3
Decorate 51(g_tTex2du4) DescriptorSet 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 51(g_tTex2du4) Binding 4
Decorate 63(g_tTexcdf4) DescriptorSet 0
Decorate 51(g_tTex2du4) DescriptorSet 0
Decorate 63(g_tTexcdf4) Binding 5
Decorate 74(g_tTexcdi4) DescriptorSet 0
Decorate 63(g_tTexcdf4) DescriptorSet 0
Decorate 74(g_tTexcdi4) Binding 6
Decorate 84(g_tTexcdu4) DescriptorSet 0
Decorate 74(g_tTexcdi4) DescriptorSet 0
Decorate 84(g_tTexcdu4) Binding 7
Decorate 84(g_tTexcdu4) DescriptorSet 0
Decorate 103(@entryPointOutput.Pos) BuiltIn Position
Decorate 106(g_sSamp2d) DescriptorSet 0
Decorate 106(g_sSamp2d) Binding 0
Decorate 109(g_tTex1df4a) DescriptorSet 0
Decorate 106(g_sSamp2d) DescriptorSet 0
Decorate 109(g_tTex1df4a) Binding 1
Decorate 110(g_tTex1df4) DescriptorSet 0
Decorate 109(g_tTex1df4a) DescriptorSet 0
Decorate 110(g_tTex1df4) Binding 0
Decorate 113(g_tTex1di4) DescriptorSet 0
Decorate 110(g_tTex1df4) DescriptorSet 0
Decorate 113(g_tTex1di4) Binding 0
Decorate 116(g_tTex1du4) DescriptorSet 0
Decorate 113(g_tTex1di4) DescriptorSet 0
Decorate 116(g_tTex1du4) Binding 0
Decorate 119(g_tTex3df4) DescriptorSet 0
Decorate 116(g_tTex1du4) DescriptorSet 0
Decorate 119(g_tTex3df4) Binding 0
Decorate 122(g_tTex3di4) DescriptorSet 0
Decorate 119(g_tTex3df4) DescriptorSet 0
Decorate 122(g_tTex3di4) Binding 0
Decorate 125(g_tTex3du4) DescriptorSet 0
Decorate 122(g_tTex3di4) DescriptorSet 0
Decorate 125(g_tTex3du4) Binding 0
Decorate 125(g_tTex3du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -245,36 +245,36 @@ using depth_any
Name 107 "g_tTexcdf4"
Name 110 "g_tTexcdi4"
Name 113 "g_tTexcdu4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 39(g_tTex2di4) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 39(g_tTex2di4) Binding 3
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 39(g_tTex2di4) DescriptorSet 0
Decorate 55(g_tTex2du4) Binding 4
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 79(@entryPointOutput.Color) Location 0
Decorate 83(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 88(g_tTex1df4a) DescriptorSet 0
Decorate 88(g_tTex1df4a) Binding 1
Decorate 89(g_tTex1df4) DescriptorSet 0
Decorate 88(g_tTex1df4a) DescriptorSet 0
Decorate 89(g_tTex1df4) Binding 0
Decorate 92(g_tTex1di4) DescriptorSet 0
Decorate 89(g_tTex1df4) DescriptorSet 0
Decorate 92(g_tTex1di4) Binding 0
Decorate 95(g_tTex1du4) DescriptorSet 0
Decorate 92(g_tTex1di4) DescriptorSet 0
Decorate 95(g_tTex1du4) Binding 0
Decorate 98(g_tTex3df4) DescriptorSet 0
Decorate 95(g_tTex1du4) DescriptorSet 0
Decorate 98(g_tTex3df4) Binding 0
Decorate 101(g_tTex3di4) DescriptorSet 0
Decorate 98(g_tTex3df4) DescriptorSet 0
Decorate 101(g_tTex3di4) Binding 0
Decorate 104(g_tTex3du4) DescriptorSet 0
Decorate 101(g_tTex3di4) DescriptorSet 0
Decorate 104(g_tTex3du4) Binding 0
Decorate 107(g_tTexcdf4) DescriptorSet 0
Decorate 104(g_tTex3du4) DescriptorSet 0
Decorate 107(g_tTexcdf4) Binding 0
Decorate 110(g_tTexcdi4) DescriptorSet 0
Decorate 107(g_tTexcdf4) DescriptorSet 0
Decorate 110(g_tTexcdi4) Binding 0
Decorate 113(g_tTexcdu4) DescriptorSet 0
Decorate 110(g_tTexcdi4) DescriptorSet 0
Decorate 113(g_tTexcdu4) Binding 0
Decorate 113(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -233,24 +233,24 @@ using depth_any
Name 90 "g_tTex1df4"
Name 93 "g_tTex1di4"
Name 96 "g_tTex1du4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 40(g_tTex2di4) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 40(g_tTex2di4) Binding 3
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 40(g_tTex2di4) DescriptorSet 0
Decorate 55(g_tTex2du4) Binding 4
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 80(@entryPointOutput.Color) Location 0
Decorate 84(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 89(g_tTex1df4a) DescriptorSet 0
Decorate 89(g_tTex1df4a) Binding 1
Decorate 90(g_tTex1df4) DescriptorSet 0
Decorate 89(g_tTex1df4a) DescriptorSet 0
Decorate 90(g_tTex1df4) Binding 0
Decorate 93(g_tTex1di4) DescriptorSet 0
Decorate 90(g_tTex1df4) DescriptorSet 0
Decorate 93(g_tTex1di4) Binding 0
Decorate 96(g_tTex1du4) DescriptorSet 0
Decorate 93(g_tTex1di4) DescriptorSet 0
Decorate 96(g_tTex1du4) Binding 0
Decorate 96(g_tTex1du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -812,37 +812,37 @@ using depth_any
Name 248 "g_tTex1df4a"
Name 251 "g_tTex1di4a"
Name 254 "g_tTex1du4a"
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 16(g_tTex2df4a) Binding 1
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 26($Global) Block
MemberDecorate 26($Global) 0 Offset 0
MemberDecorate 26($Global) 1 Offset 8
MemberDecorate 26($Global) 2 Offset 16
MemberDecorate 26($Global) 3 Offset 32
Decorate 26($Global) Block
Decorate 28 DescriptorSet 0
Decorate 28 Binding 7
Decorate 41(g_tTex2di4a) DescriptorSet 0
Decorate 28 DescriptorSet 0
Decorate 41(g_tTex2di4a) Binding 2
Decorate 55(g_tTex2du4a) DescriptorSet 0
Decorate 41(g_tTex2di4a) DescriptorSet 0
Decorate 55(g_tTex2du4a) Binding 3
Decorate 131(g_tTexcdf4a) DescriptorSet 0
Decorate 55(g_tTex2du4a) DescriptorSet 0
Decorate 131(g_tTexcdf4a) Binding 4
Decorate 143(g_tTexcdi4a) DescriptorSet 0
Decorate 131(g_tTexcdf4a) DescriptorSet 0
Decorate 143(g_tTexcdi4a) Binding 5
Decorate 154(g_tTexcdu4a) DescriptorSet 0
Decorate 143(g_tTexcdi4a) DescriptorSet 0
Decorate 154(g_tTexcdu4a) Binding 6
Decorate 154(g_tTexcdu4a) DescriptorSet 0
Decorate 238(@entryPointOutput.Color) Location 0
Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 245(g_sSamp2d) DescriptorSet 0
Decorate 245(g_sSamp2d) Binding 0
Decorate 248(g_tTex1df4a) DescriptorSet 0
Decorate 245(g_sSamp2d) DescriptorSet 0
Decorate 248(g_tTex1df4a) Binding 0
Decorate 251(g_tTex1di4a) DescriptorSet 0
Decorate 248(g_tTex1df4a) DescriptorSet 0
Decorate 251(g_tTex1di4a) Binding 0
Decorate 254(g_tTex1du4a) DescriptorSet 0
Decorate 251(g_tTex1di4a) DescriptorSet 0
Decorate 254(g_tTex1du4a) Binding 0
Decorate 254(g_tTex1du4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -823,45 +823,45 @@ using depth_any
Name 258 "g_tTex3df4"
Name 261 "g_tTex3di4"
Name 264 "g_tTex3du4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 26($Global) Block
MemberDecorate 26($Global) 0 Offset 0
MemberDecorate 26($Global) 1 Offset 8
MemberDecorate 26($Global) 2 Offset 16
MemberDecorate 26($Global) 3 Offset 32
Decorate 26($Global) Block
Decorate 28 DescriptorSet 0
Decorate 28 Binding 8
Decorate 41(g_tTex2di4) DescriptorSet 0
Decorate 28 DescriptorSet 0
Decorate 41(g_tTex2di4) Binding 3
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 41(g_tTex2di4) DescriptorSet 0
Decorate 55(g_tTex2du4) Binding 4
Decorate 131(g_tTexcdf4) DescriptorSet 0
Decorate 55(g_tTex2du4) DescriptorSet 0
Decorate 131(g_tTexcdf4) Binding 5
Decorate 143(g_tTexcdi4) DescriptorSet 0
Decorate 131(g_tTexcdf4) DescriptorSet 0
Decorate 143(g_tTexcdi4) Binding 6
Decorate 154(g_tTexcdu4) DescriptorSet 0
Decorate 143(g_tTexcdi4) DescriptorSet 0
Decorate 154(g_tTexcdu4) Binding 7
Decorate 154(g_tTexcdu4) DescriptorSet 0
Decorate 238(@entryPointOutput.Color) Location 0
Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 245(g_sSamp2d) DescriptorSet 0
Decorate 245(g_sSamp2d) Binding 0
Decorate 248(g_tTex1df4a) DescriptorSet 0
Decorate 245(g_sSamp2d) DescriptorSet 0
Decorate 248(g_tTex1df4a) Binding 1
Decorate 249(g_tTex1df4) DescriptorSet 0
Decorate 248(g_tTex1df4a) DescriptorSet 0
Decorate 249(g_tTex1df4) Binding 0
Decorate 252(g_tTex1di4) DescriptorSet 0
Decorate 249(g_tTex1df4) DescriptorSet 0
Decorate 252(g_tTex1di4) Binding 0
Decorate 255(g_tTex1du4) DescriptorSet 0
Decorate 252(g_tTex1di4) DescriptorSet 0
Decorate 255(g_tTex1du4) Binding 0
Decorate 258(g_tTex3df4) DescriptorSet 0
Decorate 255(g_tTex1du4) DescriptorSet 0
Decorate 258(g_tTex3df4) Binding 0
Decorate 261(g_tTex3di4) DescriptorSet 0
Decorate 258(g_tTex3df4) DescriptorSet 0
Decorate 261(g_tTex3di4) Binding 0
Decorate 264(g_tTex3du4) DescriptorSet 0
Decorate 261(g_tTex3di4) DescriptorSet 0
Decorate 264(g_tTex3du4) Binding 0
Decorate 264(g_tTex3du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -1333,10 +1333,11 @@ Validation failed
Name 392 "g_tTexcdf4"
Name 395 "g_tTexcdi4"
Name 398 "g_tTexcdu4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 30($Global) Block
MemberDecorate 30($Global) 0 Offset 0
MemberDecorate 30($Global) 1 Offset 8
MemberDecorate 30($Global) 2 Offset 16
@ -1345,37 +1346,36 @@ Validation failed
MemberDecorate 30($Global) 5 Offset 56
MemberDecorate 30($Global) 6 Offset 64
MemberDecorate 30($Global) 7 Offset 80
Decorate 30($Global) Block
Decorate 32 DescriptorSet 0
Decorate 32 Binding 5
Decorate 47(g_tTex2di4) DescriptorSet 0
Decorate 32 DescriptorSet 0
Decorate 47(g_tTex2di4) Binding 3
Decorate 63(g_tTex2du4) DescriptorSet 0
Decorate 47(g_tTex2di4) DescriptorSet 0
Decorate 63(g_tTex2du4) Binding 4
Decorate 63(g_tTex2du4) DescriptorSet 0
Decorate 363(@entryPointOutput.Color) Location 0
Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 370(g_sSamp2d) DescriptorSet 0
Decorate 370(g_sSamp2d) Binding 0
Decorate 373(g_tTex1df4a) DescriptorSet 0
Decorate 370(g_sSamp2d) DescriptorSet 0
Decorate 373(g_tTex1df4a) Binding 1
Decorate 374(g_tTex1df4) DescriptorSet 0
Decorate 373(g_tTex1df4a) DescriptorSet 0
Decorate 374(g_tTex1df4) Binding 0
Decorate 377(g_tTex1di4) DescriptorSet 0
Decorate 374(g_tTex1df4) DescriptorSet 0
Decorate 377(g_tTex1di4) Binding 0
Decorate 380(g_tTex1du4) DescriptorSet 0
Decorate 377(g_tTex1di4) DescriptorSet 0
Decorate 380(g_tTex1du4) Binding 0
Decorate 383(g_tTex3df4) DescriptorSet 0
Decorate 380(g_tTex1du4) DescriptorSet 0
Decorate 383(g_tTex3df4) Binding 0
Decorate 386(g_tTex3di4) DescriptorSet 0
Decorate 383(g_tTex3df4) DescriptorSet 0
Decorate 386(g_tTex3di4) Binding 0
Decorate 389(g_tTex3du4) DescriptorSet 0
Decorate 386(g_tTex3di4) DescriptorSet 0
Decorate 389(g_tTex3du4) Binding 0
Decorate 392(g_tTexcdf4) DescriptorSet 0
Decorate 389(g_tTex3du4) DescriptorSet 0
Decorate 392(g_tTexcdf4) Binding 0
Decorate 395(g_tTexcdi4) DescriptorSet 0
Decorate 392(g_tTexcdf4) DescriptorSet 0
Decorate 395(g_tTexcdi4) Binding 0
Decorate 398(g_tTexcdu4) DescriptorSet 0
Decorate 395(g_tTexcdi4) DescriptorSet 0
Decorate 398(g_tTexcdu4) Binding 0
Decorate 398(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -1322,10 +1322,11 @@ Validation failed
Name 382 "g_tTexcdf4a"
Name 385 "g_tTexcdi4a"
Name 388 "g_tTexcdu4a"
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 16(g_tTex2df4a) Binding 1
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 16(g_tTex2df4a) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 30($Global) Block
MemberDecorate 30($Global) 0 Offset 0
MemberDecorate 30($Global) 1 Offset 8
MemberDecorate 30($Global) 2 Offset 16
@ -1334,29 +1335,28 @@ Validation failed
MemberDecorate 30($Global) 5 Offset 56
MemberDecorate 30($Global) 6 Offset 64
MemberDecorate 30($Global) 7 Offset 80
Decorate 30($Global) Block
Decorate 32 DescriptorSet 0
Decorate 32 Binding 4
Decorate 47(g_tTex2di4a) DescriptorSet 0
Decorate 32 DescriptorSet 0
Decorate 47(g_tTex2di4a) Binding 2
Decorate 63(g_tTex2du4a) DescriptorSet 0
Decorate 47(g_tTex2di4a) DescriptorSet 0
Decorate 63(g_tTex2du4a) Binding 3
Decorate 63(g_tTex2du4a) DescriptorSet 0
Decorate 363(@entryPointOutput.Color) Location 0
Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 370(g_sSamp2d) DescriptorSet 0
Decorate 370(g_sSamp2d) Binding 0
Decorate 373(g_tTex1df4a) DescriptorSet 0
Decorate 370(g_sSamp2d) DescriptorSet 0
Decorate 373(g_tTex1df4a) Binding 0
Decorate 376(g_tTex1di4a) DescriptorSet 0
Decorate 373(g_tTex1df4a) DescriptorSet 0
Decorate 376(g_tTex1di4a) Binding 0
Decorate 379(g_tTex1du4a) DescriptorSet 0
Decorate 376(g_tTex1di4a) DescriptorSet 0
Decorate 379(g_tTex1du4a) Binding 0
Decorate 382(g_tTexcdf4a) DescriptorSet 0
Decorate 379(g_tTex1du4a) DescriptorSet 0
Decorate 382(g_tTexcdf4a) Binding 0
Decorate 385(g_tTexcdi4a) DescriptorSet 0
Decorate 382(g_tTexcdf4a) DescriptorSet 0
Decorate 385(g_tTexcdi4a) Binding 0
Decorate 388(g_tTexcdu4a) DescriptorSet 0
Decorate 385(g_tTexcdi4a) DescriptorSet 0
Decorate 388(g_tTexcdu4a) Binding 0
Decorate 388(g_tTexcdu4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -506,43 +506,43 @@ using depth_any
Name 157 "g_tTexcdf4"
Name 160 "g_tTexcdi4"
Name 163 "g_tTexcdu4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 16(g_tTex2df4) Binding 2
Decorate 20(g_sSampCmp) DescriptorSet 0
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSampCmp) Binding 0
Decorate 20(g_sSampCmp) DescriptorSet 0
Decorate 26($Global) Block
MemberDecorate 26($Global) 0 Offset 0
MemberDecorate 26($Global) 1 Offset 8
MemberDecorate 26($Global) 2 Offset 16
MemberDecorate 26($Global) 3 Offset 32
Decorate 26($Global) Block
Decorate 28 DescriptorSet 0
Decorate 28 Binding 5
Decorate 44(g_tTex2di4) DescriptorSet 0
Decorate 28 DescriptorSet 0
Decorate 44(g_tTex2di4) Binding 3
Decorate 60(g_tTex2du4) DescriptorSet 0
Decorate 44(g_tTex2di4) DescriptorSet 0
Decorate 60(g_tTex2du4) Binding 4
Decorate 60(g_tTex2du4) DescriptorSet 0
Decorate 129(@entryPointOutput.Color) Location 0
Decorate 133(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 138(g_tTex1df4a) DescriptorSet 0
Decorate 138(g_tTex1df4a) Binding 1
Decorate 139(g_tTex1df4) DescriptorSet 0
Decorate 138(g_tTex1df4a) DescriptorSet 0
Decorate 139(g_tTex1df4) Binding 0
Decorate 142(g_tTex1di4) DescriptorSet 0
Decorate 139(g_tTex1df4) DescriptorSet 0
Decorate 142(g_tTex1di4) Binding 0
Decorate 145(g_tTex1du4) DescriptorSet 0
Decorate 142(g_tTex1di4) DescriptorSet 0
Decorate 145(g_tTex1du4) Binding 0
Decorate 148(g_tTex3df4) DescriptorSet 0
Decorate 145(g_tTex1du4) DescriptorSet 0
Decorate 148(g_tTex3df4) Binding 0
Decorate 151(g_tTex3di4) DescriptorSet 0
Decorate 148(g_tTex3df4) DescriptorSet 0
Decorate 151(g_tTex3di4) Binding 0
Decorate 154(g_tTex3du4) DescriptorSet 0
Decorate 151(g_tTex3di4) DescriptorSet 0
Decorate 154(g_tTex3du4) Binding 0
Decorate 157(g_tTexcdf4) DescriptorSet 0
Decorate 154(g_tTex3du4) DescriptorSet 0
Decorate 157(g_tTexcdf4) Binding 0
Decorate 160(g_tTexcdi4) DescriptorSet 0
Decorate 157(g_tTexcdf4) DescriptorSet 0
Decorate 160(g_tTexcdi4) Binding 0
Decorate 163(g_tTexcdu4) DescriptorSet 0
Decorate 160(g_tTexcdi4) DescriptorSet 0
Decorate 163(g_tTexcdu4) Binding 0
Decorate 163(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -2422,64 +2422,64 @@ using depth_any
Name 540 "@entryPointOutput.Color"
Name 544 "@entryPointOutput.Depth"
Name 549 "g_sSamp"
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 17(g_tTex1df4) Binding 0
Decorate 35(g_tTex1di4) DescriptorSet 0
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 35(g_tTex1di4) Binding 1
Decorate 48(g_tTex1du4) DescriptorSet 0
Decorate 35(g_tTex1di4) DescriptorSet 0
Decorate 48(g_tTex1du4) Binding 2
Decorate 63(g_tTex1df4a) DescriptorSet 0
Decorate 48(g_tTex1du4) DescriptorSet 0
Decorate 63(g_tTex1df4a) Binding 12
Decorate 85(g_tTex1di4a) DescriptorSet 0
Decorate 63(g_tTex1df4a) DescriptorSet 0
Decorate 85(g_tTex1di4a) Binding 13
Decorate 104(g_tTex1du4a) DescriptorSet 0
Decorate 85(g_tTex1di4a) DescriptorSet 0
Decorate 104(g_tTex1du4a) Binding 14
Decorate 123(g_tTex2df4) DescriptorSet 0
Decorate 104(g_tTex1du4a) DescriptorSet 0
Decorate 123(g_tTex2df4) Binding 3
Decorate 143(g_tTex2di4) DescriptorSet 0
Decorate 123(g_tTex2df4) DescriptorSet 0
Decorate 143(g_tTex2di4) Binding 4
Decorate 162(g_tTex2du4) DescriptorSet 0
Decorate 143(g_tTex2di4) DescriptorSet 0
Decorate 162(g_tTex2du4) Binding 5
Decorate 183(g_tTex2df4a) DescriptorSet 0
Decorate 162(g_tTex2du4) DescriptorSet 0
Decorate 183(g_tTex2df4a) Binding 15
Decorate 207(g_tTex2di4a) DescriptorSet 0
Decorate 183(g_tTex2df4a) DescriptorSet 0
Decorate 207(g_tTex2di4a) Binding 16
Decorate 230(g_tTex2du4a) DescriptorSet 0
Decorate 207(g_tTex2di4a) DescriptorSet 0
Decorate 230(g_tTex2du4a) Binding 17
Decorate 253(g_tTex3df4) DescriptorSet 0
Decorate 230(g_tTex2du4a) DescriptorSet 0
Decorate 253(g_tTex3df4) Binding 6
Decorate 277(g_tTex3di4) DescriptorSet 0
Decorate 253(g_tTex3df4) DescriptorSet 0
Decorate 277(g_tTex3di4) Binding 7
Decorate 300(g_tTex3du4) DescriptorSet 0
Decorate 277(g_tTex3di4) DescriptorSet 0
Decorate 300(g_tTex3du4) Binding 8
Decorate 323(g_tTexcdf4) DescriptorSet 0
Decorate 300(g_tTex3du4) DescriptorSet 0
Decorate 323(g_tTexcdf4) Binding 9
Decorate 342(g_tTexcdi4) DescriptorSet 0
Decorate 323(g_tTexcdf4) DescriptorSet 0
Decorate 342(g_tTexcdi4) Binding 10
Decorate 361(g_tTexcdu4) DescriptorSet 0
Decorate 342(g_tTexcdi4) DescriptorSet 0
Decorate 361(g_tTexcdu4) Binding 11
Decorate 380(g_tTexcdf4a) DescriptorSet 0
Decorate 361(g_tTexcdu4) DescriptorSet 0
Decorate 380(g_tTexcdf4a) Binding 18
Decorate 403(g_tTexcdi4a) DescriptorSet 0
Decorate 380(g_tTexcdf4a) DescriptorSet 0
Decorate 403(g_tTexcdi4a) Binding 19
Decorate 426(g_tTexcdu4a) DescriptorSet 0
Decorate 403(g_tTexcdi4a) DescriptorSet 0
Decorate 426(g_tTexcdu4a) Binding 20
Decorate 449(g_tTex2dmsf4) DescriptorSet 0
Decorate 426(g_tTexcdu4a) DescriptorSet 0
Decorate 449(g_tTex2dmsf4) Binding 21
Decorate 462(g_tTex2dmsi4) DescriptorSet 0
Decorate 449(g_tTex2dmsf4) DescriptorSet 0
Decorate 462(g_tTex2dmsi4) Binding 22
Decorate 474(g_tTex2dmsu4) DescriptorSet 0
Decorate 462(g_tTex2dmsi4) DescriptorSet 0
Decorate 474(g_tTex2dmsu4) Binding 23
Decorate 486(g_tTex2dmsf4a) DescriptorSet 0
Decorate 474(g_tTex2dmsu4) DescriptorSet 0
Decorate 486(g_tTex2dmsf4a) Binding 24
Decorate 500(g_tTex2dmsi4a) DescriptorSet 0
Decorate 486(g_tTex2dmsf4a) DescriptorSet 0
Decorate 500(g_tTex2dmsi4a) Binding 25
Decorate 514(g_tTex2dmsu4a) DescriptorSet 0
Decorate 500(g_tTex2dmsi4a) DescriptorSet 0
Decorate 514(g_tTex2dmsu4a) Binding 26
Decorate 514(g_tTex2dmsu4a) DescriptorSet 0
Decorate 540(@entryPointOutput.Color) Location 0
Decorate 544(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 549(g_sSamp) DescriptorSet 0
Decorate 549(g_sSamp) Binding 0
Decorate 549(g_sSamp) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -138,11 +138,11 @@ Shader version: 500
Name 33 "vsout"
Name 42 "@entryPointOutput.Pos"
Name 47 "g_sSamp"
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 17(g_tTex1df4) Binding 0
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 42(@entryPointOutput.Pos) BuiltIn Position
Decorate 47(g_sSamp) DescriptorSet 0
Decorate 47(g_sSamp) Binding 0
Decorate 47(g_sSamp) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -791,46 +791,47 @@ using depth_any
MemberName 229($Global) 6 "o3"
MemberName 229($Global) 7 "o4"
Name 231 ""
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 17(g_tTex1df4) Binding 0
Decorate 26(g_tTex1di4) DescriptorSet 0
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 26(g_tTex1di4) Binding 1
Decorate 33(g_tTex1du4) DescriptorSet 0
Decorate 26(g_tTex1di4) DescriptorSet 0
Decorate 33(g_tTex1du4) Binding 2
Decorate 40(g_tBuffF) DescriptorSet 0
Decorate 33(g_tTex1du4) DescriptorSet 0
Decorate 40(g_tBuffF) Binding 15
Decorate 47(g_tBuffI) DescriptorSet 0
Decorate 40(g_tBuffF) DescriptorSet 0
Decorate 47(g_tBuffI) Binding 16
Decorate 54(g_tBuffU) DescriptorSet 0
Decorate 47(g_tBuffI) DescriptorSet 0
Decorate 54(g_tBuffU) Binding 17
Decorate 63(g_tTex1df4a) DescriptorSet 0
Decorate 54(g_tBuffU) DescriptorSet 0
Decorate 63(g_tTex1df4a) Binding 9
Decorate 76(g_tTex1di4a) DescriptorSet 0
Decorate 63(g_tTex1df4a) DescriptorSet 0
Decorate 76(g_tTex1di4a) Binding 10
Decorate 86(g_tTex1du4a) DescriptorSet 0
Decorate 76(g_tTex1di4a) DescriptorSet 0
Decorate 86(g_tTex1du4a) Binding 11
Decorate 96(g_tTex2df4) DescriptorSet 0
Decorate 86(g_tTex1du4a) DescriptorSet 0
Decorate 96(g_tTex2df4) Binding 3
Decorate 107(g_tTex2di4) DescriptorSet 0
Decorate 96(g_tTex2df4) DescriptorSet 0
Decorate 107(g_tTex2di4) Binding 4
Decorate 117(g_tTex2du4) DescriptorSet 0
Decorate 107(g_tTex2di4) DescriptorSet 0
Decorate 117(g_tTex2du4) Binding 5
Decorate 129(g_tTex2df4a) DescriptorSet 0
Decorate 117(g_tTex2du4) DescriptorSet 0
Decorate 129(g_tTex2df4a) Binding 12
Decorate 142(g_tTex2di4a) DescriptorSet 0
Decorate 129(g_tTex2df4a) DescriptorSet 0
Decorate 142(g_tTex2di4a) Binding 13
Decorate 154(g_tTex2du4a) DescriptorSet 0
Decorate 142(g_tTex2di4a) DescriptorSet 0
Decorate 154(g_tTex2du4a) Binding 14
Decorate 166(g_tTex3df4) DescriptorSet 0
Decorate 154(g_tTex2du4a) DescriptorSet 0
Decorate 166(g_tTex3df4) Binding 6
Decorate 179(g_tTex3di4) DescriptorSet 0
Decorate 166(g_tTex3df4) DescriptorSet 0
Decorate 179(g_tTex3di4) Binding 7
Decorate 191(g_tTex3du4) DescriptorSet 0
Decorate 179(g_tTex3di4) DescriptorSet 0
Decorate 191(g_tTex3du4) Binding 8
Decorate 191(g_tTex3du4) DescriptorSet 0
Decorate 216(@entryPointOutput.Color) Location 0
Decorate 220(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 225(g_sSamp) DescriptorSet 0
Decorate 225(g_sSamp) Binding 0
Decorate 225(g_sSamp) DescriptorSet 0
Decorate 229($Global) Block
MemberDecorate 229($Global) 0 Offset 0
MemberDecorate 229($Global) 1 Offset 8
MemberDecorate 229($Global) 2 Offset 16
@ -839,9 +840,8 @@ using depth_any
MemberDecorate 229($Global) 5 Offset 56
MemberDecorate 229($Global) 6 Offset 64
MemberDecorate 229($Global) 7 Offset 80
Decorate 229($Global) Block
Decorate 231 DescriptorSet 0
Decorate 231 Binding 0
Decorate 231 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -619,16 +619,16 @@ using depth_any
Name 188 "@entryPointOutput.Color"
Name 192 "@entryPointOutput.Depth"
Name 197 "g_sSamp"
Decorate 23(g_tTex2dmsf4) DescriptorSet 0
Decorate 23(g_tTex2dmsf4) Binding 1
Decorate 131(g_tTex2dmsf4a) DescriptorSet 0
Decorate 23(g_tTex2dmsf4) DescriptorSet 0
Decorate 131(g_tTex2dmsf4a) Binding 2
Decorate 131(g_tTex2dmsf4a) DescriptorSet 0
Decorate 181(sample) Flat
Decorate 181(sample) Location 0
Decorate 188(@entryPointOutput.Color) Location 0
Decorate 192(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate 197(g_sSamp) DescriptorSet 0
Decorate 197(g_sSamp) Binding 0
Decorate 197(g_sSamp) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1

View file

@ -119,10 +119,10 @@ gl_FragCoord origin is upper left
Name 15 ""
Name 26 "a1"
Name 41 "@entryPointOutput"
MemberDecorate 13(CB) 0 Offset 0
Decorate 13(CB) Block
Decorate 15 DescriptorSet 0
MemberDecorate 13(CB) 0 Offset 0
Decorate 15 Binding 0
Decorate 15 DescriptorSet 0
Decorate 41(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2

View file

@ -99,8 +99,8 @@ local_size = (8, 8, 1)
Name 26 "vGroupId"
Name 29 "vGroupId"
Name 34 "param"
Decorate 22(OutputTexture) DescriptorSet 0
Decorate 22(OutputTexture) Binding 0
Decorate 22(OutputTexture) DescriptorSet 0
Decorate 29(vGroupId) BuiltIn WorkgroupId
2: TypeVoid
3: TypeFunction 2

View file

@ -1057,32 +1057,32 @@ triangle order = ccw
Name 204 "Q1"
Name 213 "Q2"
Name 222 "vertex"
Decorate 42(UniformBlock0) Block
MemberDecorate 42(UniformBlock0) 0 RowMajor
MemberDecorate 42(UniformBlock0) 0 Offset 0
MemberDecorate 42(UniformBlock0) 0 MatrixStride 16
MemberDecorate 42(UniformBlock0) 0 Offset 0
MemberDecorate 42(UniformBlock0) 1 RowMajor
MemberDecorate 42(UniformBlock0) 1 Offset 64
MemberDecorate 42(UniformBlock0) 1 MatrixStride 16
MemberDecorate 42(UniformBlock0) 1 Offset 64
MemberDecorate 42(UniformBlock0) 2 RowMajor
MemberDecorate 42(UniformBlock0) 2 Offset 128
MemberDecorate 42(UniformBlock0) 2 MatrixStride 16
MemberDecorate 42(UniformBlock0) 2 Offset 128
MemberDecorate 42(UniformBlock0) 3 RowMajor
MemberDecorate 42(UniformBlock0) 3 Offset 192
MemberDecorate 42(UniformBlock0) 3 MatrixStride 16
MemberDecorate 42(UniformBlock0) 3 Offset 192
MemberDecorate 42(UniformBlock0) 4 Offset 240
MemberDecorate 42(UniformBlock0) 5 Offset 256
MemberDecorate 42(UniformBlock0) 6 Offset 272
Decorate 42(UniformBlock0) Block
Decorate 44 DescriptorSet 0
Decorate 44 Binding 0
Decorate 44 DescriptorSet 0
Decorate 97(patch.PositionWS) Location 0
Decorate 102(patch.NormalWS) Location 1
Decorate 120(id) BuiltIn InvocationId
Decorate 123(@entryPointOutput.PositionWS) Location 0
Decorate 145(@patchConstantOutput.EdgeTessFactor) Patch
Decorate 145(@patchConstantOutput.EdgeTessFactor) BuiltIn TessLevelOuter
Decorate 158(@patchConstantOutput.InsideTessFactor) Patch
Decorate 145(@patchConstantOutput.EdgeTessFactor) Patch
Decorate 158(@patchConstantOutput.InsideTessFactor) BuiltIn TessLevelInner
Decorate 158(@patchConstantOutput.InsideTessFactor) Patch
Decorate 162(@patchConstantOutput.NormalWS[0]) Patch
Decorate 162(@patchConstantOutput.NormalWS[0]) Location 1
Decorate 165(@patchConstantOutput.NormalWS[1]) Patch

View file

@ -50,6 +50,7 @@ Shader version: 500
MemberName 15(b) 10 "m96"
Name 17 ""
Decorate 14 ArrayStride 16
Decorate 15(b) Block
MemberDecorate 15(b) 0 Offset 0
MemberDecorate 15(b) 1 Offset 4
MemberDecorate 15(b) 2 Offset 16
@ -61,9 +62,8 @@ Shader version: 500
MemberDecorate 15(b) 8 Offset 76
MemberDecorate 15(b) 9 Offset 80
MemberDecorate 15(b) 10 Offset 96
Decorate 15(b) Block
Decorate 17 DescriptorSet 0
Decorate 17 Binding 0
Decorate 17 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
9: TypeFloat 32

View file

@ -364,8 +364,8 @@ vertex spacing = equal_spacing
Decorate 60(m_cpid) BuiltIn InvocationId
Decorate 63(@entryPointOutput.cpoint) Location 0
Decorate 81(pid) BuiltIn PrimitiveId
Decorate 87(@patchConstantOutput.edges) Patch
Decorate 87(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 87(@patchConstantOutput.edges) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -361,8 +361,8 @@ vertex spacing = equal_spacing
Decorate 63(InvocationId) BuiltIn InvocationId
Decorate 79(pid) BuiltIn PrimitiveId
Decorate 81(pos) BuiltIn Position
Decorate 89(@patchConstantOutput.edges) Patch
Decorate 89(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 89(@patchConstantOutput.edges) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -362,8 +362,8 @@ vertex spacing = equal_spacing
Decorate 63(InvocationId) BuiltIn InvocationId
Decorate 79(pid) BuiltIn PrimitiveId
Decorate 81(pos) BuiltIn Position
Decorate 89(@patchConstantOutput.edges) Patch
Decorate 89(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 89(@patchConstantOutput.edges) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -502,10 +502,10 @@ triangle order = cw
Decorate 61(I.m_Normal) Location 0
Decorate 80(cpid) BuiltIn InvocationId
Decorate 83(@entryPointOutput.m_Position) BuiltIn Position
Decorate 107(@patchConstantOutput.fTessFactor) Patch
Decorate 107(@patchConstantOutput.fTessFactor) BuiltIn TessLevelOuter
Decorate 120(@patchConstantOutput.fInsideTessFactor) Patch
Decorate 107(@patchConstantOutput.fTessFactor) Patch
Decorate 120(@patchConstantOutput.fInsideTessFactor) BuiltIn TessLevelInner
Decorate 120(@patchConstantOutput.fInsideTessFactor) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -503,10 +503,10 @@ triangle order = ccw
Decorate 97(@entryPointOutput.Position) Location 0
Decorate 104(@entryPointOutput.Color) Location 1
Decorate 117(BlockID) BuiltIn PrimitiveId
Decorate 119(Inside) Patch
Decorate 119(Inside) BuiltIn TessLevelInner
Decorate 128(@patchConstantOutput.Edges) Patch
Decorate 119(Inside) Patch
Decorate 128(@patchConstantOutput.Edges) BuiltIn TessLevelOuter
Decorate 128(@patchConstantOutput.Edges) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -522,10 +522,10 @@ triangle order = cw
Decorate 42(i.val) Location 0
Decorate 57(cpid) BuiltIn InvocationId
Decorate 60(@entryPointOutput.val) Location 0
Decorate 105(@patchConstantOutput.tfactor) Patch
Decorate 105(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter
Decorate 119(@patchConstantOutput.flInFactor) Patch
Decorate 105(@patchConstantOutput.tfactor) Patch
Decorate 119(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner
Decorate 119(@patchConstantOutput.flInFactor) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -541,10 +541,10 @@ triangle order = cw
Decorate 43(i.val) Location 0
Decorate 58(cpid) BuiltIn InvocationId
Decorate 61(@entryPointOutput.val) Location 0
Decorate 107(@patchConstantOutput.tfactor) Patch
Decorate 107(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter
Decorate 121(@patchConstantOutput.flInFactor) Patch
Decorate 107(@patchConstantOutput.tfactor) Patch
Decorate 121(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner
Decorate 121(@patchConstantOutput.flInFactor) Patch
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View file

@ -444,36 +444,36 @@ local_size = (8, 8, 8)
Name 179 "tid"
Name 181 "tid"
Name 183 "param"
Decorate 19(i1D) DescriptorSet 0
Decorate 19(i1D) Binding 0
Decorate 34(i2D) DescriptorSet 0
Decorate 19(i1D) DescriptorSet 0
Decorate 34(i2D) Binding 1
Decorate 45(i3D) DescriptorSet 0
Decorate 34(i2D) DescriptorSet 0
Decorate 45(i3D) Binding 2
Decorate 54(i1DArray) DescriptorSet 0
Decorate 45(i3D) DescriptorSet 0
Decorate 54(i1DArray) Binding 3
Decorate 64(i2DArray) DescriptorSet 0
Decorate 54(i1DArray) DescriptorSet 0
Decorate 64(i2DArray) Binding 4
Decorate 73(i2DMS) DescriptorSet 0
Decorate 64(i2DArray) DescriptorSet 0
Decorate 73(i2DMS) Binding 5
Decorate 86(i2DMSArray) DescriptorSet 0
Decorate 73(i2DMS) DescriptorSet 0
Decorate 86(i2DMSArray) Binding 6
Decorate 100(ii1D) DescriptorSet 0
Decorate 86(i2DMSArray) DescriptorSet 0
Decorate 100(ii1D) Binding 7
Decorate 111(ii2D) DescriptorSet 0
Decorate 100(ii1D) DescriptorSet 0
Decorate 111(ii2D) Binding 8
Decorate 121(ii3D) DescriptorSet 0
Decorate 111(ii2D) DescriptorSet 0
Decorate 121(ii3D) Binding 9
Decorate 130(ii1DArray) DescriptorSet 0
Decorate 121(ii3D) DescriptorSet 0
Decorate 130(ii1DArray) Binding 10
Decorate 140(ii2DArray) DescriptorSet 0
Decorate 130(ii1DArray) DescriptorSet 0
Decorate 140(ii2DArray) Binding 11
Decorate 149(ii2DMS) DescriptorSet 0
Decorate 140(ii2DArray) DescriptorSet 0
Decorate 149(ii2DMS) Binding 12
Decorate 160(ii2DMSArray) DescriptorSet 0
Decorate 149(ii2DMS) DescriptorSet 0
Decorate 160(ii2DMSArray) Binding 13
Decorate 175(OUT) DescriptorSet 0
Decorate 160(ii2DMSArray) DescriptorSet 0
Decorate 175(OUT) Binding 0
Decorate 175(OUT) DescriptorSet 0
Decorate 181(tid) BuiltIn GlobalInvocationId
2: TypeVoid
3: TypeFunction 2

View file

@ -296,28 +296,28 @@ local_size = (8, 8, 8)
Name 131 "tid"
Name 133 "tid"
Name 135 "param"
Decorate 19(i1D) DescriptorSet 0
Decorate 19(i1D) Binding 0
Decorate 32(i2D) DescriptorSet 0
Decorate 19(i1D) DescriptorSet 0
Decorate 32(i2D) Binding 1
Decorate 43(i3D) DescriptorSet 0
Decorate 32(i2D) DescriptorSet 0
Decorate 43(i3D) Binding 2
Decorate 52(i1DArray) DescriptorSet 0
Decorate 43(i3D) DescriptorSet 0
Decorate 52(i1DArray) Binding 3
Decorate 62(i2DArray) DescriptorSet 0
Decorate 52(i1DArray) DescriptorSet 0
Decorate 62(i2DArray) Binding 4
Decorate 75(ii1D) DescriptorSet 0
Decorate 62(i2DArray) DescriptorSet 0
Decorate 75(ii1D) Binding 5
Decorate 86(ii2D) DescriptorSet 0
Decorate 75(ii1D) DescriptorSet 0
Decorate 86(ii2D) Binding 6
Decorate 96(ii3D) DescriptorSet 0
Decorate 86(ii2D) DescriptorSet 0
Decorate 96(ii3D) Binding 7
Decorate 105(ii1DArray) DescriptorSet 0
Decorate 96(ii3D) DescriptorSet 0
Decorate 105(ii1DArray) Binding 8
Decorate 115(ii2DArray) DescriptorSet 0
Decorate 105(ii1DArray) DescriptorSet 0
Decorate 115(ii2DArray) Binding 9
Decorate 127(OUT) DescriptorSet 0
Decorate 115(ii2DArray) DescriptorSet 0
Decorate 127(OUT) Binding 10
Decorate 127(OUT) DescriptorSet 0
Decorate 133(tid) BuiltIn GlobalInvocationId
2: TypeVoid
3: TypeFunction 2

Some files were not shown because too many files have changed in this diff Show more